[apache-commons-compress] Build with xmvn
Mikolaj Izdebski
mizdebsk at fedoraproject.org
Tue Jan 8 16:00:42 UTC 2013
commit 6a6c14152e5e8ec298abad551fd6ba17a64a6c91
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date: Tue Jan 8 16:47:53 2013 +0100
Build with xmvn
apache-commons-compress.spec | 102 ++++++++++++++----------------------------
1 files changed, 34 insertions(+), 68 deletions(-)
---
diff --git a/apache-commons-compress.spec b/apache-commons-compress.spec
index af01597..60432f4 100644
--- a/apache-commons-compress.spec
+++ b/apache-commons-compress.spec
@@ -1,96 +1,62 @@
%global base_name compress
%global short_name commons-%{base_name}
-Name: apache-%{short_name}
-Version: 1.4.1
-Release: 2%{?dist}
-Summary: Java API for working with tar, zip and bzip2 files
-Group: Development/Libraries
-License: ASL 2.0
-URL: http://commons.apache.org/%{base_name}/
-Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
-BuildArch: noarch
-
-BuildRequires: java-devel >= 1:1.6.0
-BuildRequires: jpackage-utils
-BuildRequires: apache-commons-parent
-BuildRequires: junit4
-BuildRequires: maven-surefire-provider-junit4
-BuildRequires: xz-java
-Requires: java >= 1:1.6.0
-Requires: jpackage-utils
-Requires: xz-java
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
-
-# Upstream name change
-Provides: jakarta-%{short_name} = %{version}-%{release}
-Obsoletes: jakarta-%{short_name} < 1.0-2
+Name: apache-%{short_name}
+Version: 1.4.1
+Release: 3%{?dist}
+Summary: Java API for working with compressed files and archivers
+Group: Development/Libraries
+License: ASL 2.0
+URL: http://commons.apache.org/%{base_name}/
+Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
+BuildArch: noarch
+
+BuildRequires: xmvn >= 0.2.1
+BuildRequires: javapackages-tools >= 0.10.0
+BuildRequires: apache-commons-parent
+BuildRequires: maven-surefire-provider-junit
+BuildRequires: xz-java
+
+Provides: jakarta-%{short_name} = %{version}-%{release}
+Obsoletes: jakarta-%{short_name} < 1.0-2
%description
-The code in this component came from Avalon's Excalibur, but originally
-from Ant, as far as life in Apache goes. The tar package is originally
-Tim Endres' public domain package. The bzip2 package is based on the
-work done by Keiron Liddle. It has migrated via:
-Ant -> Avalon-Excalibur -> Commons-IO -> Commons-Compress.
+The Apache Commons Compress library defines an API for working with
+ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200 and bzip2 files.
%package javadoc
-Summary: Javadocs for %{name}
+Summary: API documentation for %{name}
Group: Documentation
-Requires: jpackage-utils
-
-# Upstream name change
-Provides: jakarta-%{short_name}-javadoc = %{version}-%{release}
-Obsoletes: jakarta-%{short_name}-javadoc < 1.0-2
+Provides: jakarta-%{short_name}-javadoc = %{version}-%{release}
+Obsoletes: jakarta-%{short_name}-javadoc < 1.0-2
%description javadoc
-This package contains the API documentation for %{name}.
+This package provides %{summary}.
%prep
%setup -q -n %{short_name}-%{version}-src
%build
-mvn-rpmbuild install javadoc:aggregate
+%mvn_file : %{short_name} %{name}
+%mvn_alias : commons:
+%mvn_build
%install
-# jars
-install -d -m 0755 %{buildroot}%{_javadir}
-install -m 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
-
-# poms
-install -d -m 0755 %{buildroot}%{_mavenpomdir}
-install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom
-%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
-
-# javadoc
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
-cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
-
-
-%post
-%update_maven_depmap
+%mvn_install
-
-%postun
-%update_maven_depmap
-
-
-%files
-%defattr(-,root,root,-)
+%files -f .mfiles
%doc LICENSE.txt NOTICE.txt
-%{_javadir}/*
-%{_mavenpomdir}/JPP-%{short_name}.pom
-%{_mavendepmapfragdir}/*
-%files javadoc
-%defattr(-,root,root,-)
+%files javadoc -f .mfiles-javadoc
%doc LICENSE.txt NOTICE.txt
-%doc %{_javadocdir}/%{name}
%changelog
+* Tue Jan 8 2013 Mikolaj Izdebski <mizdebsk at redhat.com> - 1.4.1-3
+- Build with xmvn
+- Update to current packaging guidelines
+
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list