[checkstyle] Build with xmvn
Michal Srb
msrb at fedoraproject.org
Mon Jan 21 14:31:15 UTC 2013
commit aab204ff2cc596f2d232ffb585170f2060f950d5
Author: Michal Srb <msrb at redhat.com>
Date: Thu Jan 17 08:13:41 2013 +0100
Build with xmvn
checkstyle.spec | 37 ++++++++++---------------------------
1 files changed, 10 insertions(+), 27 deletions(-)
---
diff --git a/checkstyle.spec b/checkstyle.spec
index cd5a157..5f533aa 100644
--- a/checkstyle.spec
+++ b/checkstyle.spec
@@ -30,7 +30,7 @@
Name: checkstyle
Version: 5.6
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Java source code checker
URL: http://checkstyle.sourceforge.net/
# src/checkstyle/com/puppycrawl/tools/checkstyle/grammars/java.g is GPLv2+
@@ -57,7 +57,7 @@ BuildRequires: apache-commons-cli
BuildRequires: apache-commons-logging
BuildRequires: guava
BuildRequires: junit
-BuildRequires: maven
+BuildRequires: xmvn
BuildRequires: maven-antrun-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-enforcer-plugin
@@ -71,14 +71,6 @@ BuildRequires: maven-site-plugin
BuildRequires: maven-surefire-plugin
BuildRequires: maven-surefire-provider-junit4
-Requires: java-devel
-Requires: jpackage-utils
-Requires: antlr-tool
-Requires: apache-commons-beanutils
-Requires: apache-commons-cli
-Requires: apache-commons-logging
-Requires: guava
-
BuildArch: noarch
Obsoletes: %{name}-optional < %{version}-%{release}
@@ -100,7 +92,6 @@ Demonstrations and samples for %{name}.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
-Requires: jpackage-utils
%description javadoc
API documentation for %{name}.
@@ -121,19 +112,12 @@ sed -i 's/\r//' LICENSE LICENSE.apache20 README RIGHTS.antlr \
rm -f src/tests/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoaderTest.java
%build
-mvn-rpmbuild -e install javadoc:aggregate
+%mvn_file : %{name}
+%mvn_build
%install
-# jar
-install -dm 755 %{buildroot}%{_javadir}
-cp -pa target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-
-# pom
-install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
-install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-checkstyle.pom
-%add_maven_depmap JPP-checkstyle.pom %{name}.jar
-
+%mvn_install
# script
%jpackage_script com.puppycrawl.tools.checkstyle.Main "" "" checkstyle:antlr:apache-commons-beanutils:apache-commons-cli:apache-commons-logging:guava checkstyle true
@@ -173,12 +157,9 @@ if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
%{_datadir}/xml/%{name}/catalog > /dev/null || :
fi
-%files
+%files -f .mfiles
%doc LICENSE README
%doc checkstyle_checks.xml java.header sun_checks.xml suppressions.xml
-%{_mavenpomdir}/JPP-%{name}.pom
-%{_mavendepmapfragdir}/%{name}
-%{_javadir}/%{name}.jar
%{_datadir}/xml/%{name}
%{_bindir}/%{name}
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
@@ -186,12 +167,14 @@ fi
%files demo
%{_datadir}/%{name}
-%files javadoc
+%files javadoc -f .mfiles-javadoc
%doc LICENSE
-%doc %{_javadocdir}/%{name}
%changelog
+* Thu Jan 17 2013 Michal Srb <msrb at redhat.com> - 5.6-3
+- Build with xmvn
+
* Tue Dec 4 2012 Mikolaj Izdebski <mizdebsk at redhat.com> - 5.6-2
- Disable unit test that needs network access
- Remove rpm bug workaround
More information about the scm-commits
mailing list