apache-commons-compress/apache-commons-compress.spec

149 lines
4.5 KiB
RPMSpec
Raw Normal View History

2011-08-04 08:43:12 +00:00
%global shortname commons-compress
2010-05-11 07:44:54 +00:00
2011-08-04 08:43:12 +00:00
Name: apache-%{shortname}
Version: 1.2
Release: 1%{?dist}
2010-05-11 07:44:54 +00:00
Summary: Java API for working with tar, zip and bzip2 files
Group: Development/Libraries
License: ASL 2.0
2011-08-04 08:43:12 +00:00
URL: http://commons.apache.org/compress/
Source0: http://www.apache.org/dist/commons/compress/source/%{shortname}-%{version}-src.tar.gz
2010-05-11 07:44:54 +00:00
BuildArch: noarch
2011-08-04 08:43:12 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2010-05-11 07:44:54 +00:00
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
2011-08-04 08:43:12 +00:00
BuildRequires: maven2
BuildRequires: maven2-plugin-antrun
BuildRequires: maven2-plugin-assembly
BuildRequires: maven2-plugin-compiler
BuildRequires: maven2-plugin-idea
BuildRequires: maven2-plugin-install
BuildRequires: maven2-plugin-jar
BuildRequires: maven2-plugin-javadoc
BuildRequires: maven2-plugin-resources
BuildRequires: maven2-plugin-source
BuildRequires: maven-doxia-sitetools
BuildRequires: maven-plugin-bundle
BuildRequires: maven-surefire-maven-plugin
BuildRequires: maven-surefire-provider-junit
2010-05-11 07:44:54 +00:00
Requires: java >= 1:1.6.0
Requires: jpackage-utils
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
# Upstream name change
2011-08-04 08:43:12 +00:00
Provides: jakarta-%{shortname} = %{version}-%{release}
Obsoletes: jakarta-%{shortname} < 1.0-2
2010-05-11 07:44:54 +00:00
%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.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
2011-08-04 08:43:12 +00:00
Requires: %{name} = %{version}-%{release}
2010-05-11 07:44:54 +00:00
Requires: jpackage-utils
# Upstream name change
2011-08-04 08:43:12 +00:00
Provides: jakarta-%{shortname}-javadoc = %{version}-%{release}
Obsoletes: jakarta-%{shortname}-javadoc < 1.0-2
2010-05-11 07:44:54 +00:00
%description javadoc
2011-08-04 08:43:12 +00:00
Development documentation for %{name}.
2010-05-11 07:44:54 +00:00
%prep
2011-08-04 08:43:12 +00:00
%setup -q -n %{shortname}-%{version}-src
2010-05-11 07:44:54 +00:00
%build
2011-08-04 08:43:12 +00:00
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
mvn-jpp -e -Dmaven.repo.local=$MAVEN_REPO_LOCAL install javadoc:javadoc
2010-05-11 07:44:54 +00:00
%install
2011-08-04 08:43:12 +00:00
rm -rf $RPM_BUILD_ROOT
2010-05-11 07:44:54 +00:00
2011-08-04 08:43:12 +00:00
# jar
install -d $RPM_BUILD_ROOT%{_javadir}
install -m644 target/%{shortname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{shortname}-%{version}.jar
ln -s %{shortname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{shortname}.jar
ln -s %{shortname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{shortname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
2010-05-11 07:44:54 +00:00
# javadoc
2011-08-04 08:43:12 +00:00
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# pomfile
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{shortname}.pom
%add_to_maven_depmap org.apache.commons %{shortname} %{version} JPP %{shortname}
%clean
rm -rf $RPM_BUILD_ROOT
2010-05-11 07:44:54 +00:00
%post
%update_maven_depmap
2011-08-04 08:43:12 +00:00
2010-05-11 07:44:54 +00:00
%postun
%update_maven_depmap
2011-08-04 08:43:12 +00:00
2010-05-11 07:44:54 +00:00
%files
%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt
2011-08-04 08:43:12 +00:00
%{_javadir}/%{shortname}.jar
%{_javadir}/%{shortname}-%{version}.jar
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_mavendepmapfragdir}/%{name}
%{_mavenpomdir}/JPP-%{shortname}.pom
2010-05-11 07:44:54 +00:00
%files javadoc
%defattr(-,root,root,-)
2011-08-04 08:43:12 +00:00
%{_javadocdir}/%{name}
2010-05-11 07:44:54 +00:00
%changelog
2011-08-04 08:43:12 +00:00
* Wed Oct 06 2010 Sandro Mathys <red at fedoraproject.org> - 1.2-1
- New upstream version
2011-08-04 08:43:12 +00:00
* Wed Oct 06 2010 Sandro Mathys <red at fedoraproject.org> - 1.1-1
- New upstream version
* Sun Jul 11 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-8
- Fixed the Maven depmap line by replacing org.apache.maven by org.apache.commons
* Mon May 31 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-7
- Fixed regression with missing Provides/Obsoletes for javadocs
- Fixed changelog format
2010-05-23 21:51:03 +00:00
* Sun May 23 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-6
- Fixed Maven depmap to use commons-compress
2010-05-23 21:51:03 +00:00
* Thu May 13 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-5
- Added missing Provides/Obsoletes for javadocs
2010-05-11 07:44:54 +00:00
* Mon May 10 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-4
- Cleared some problems after the review
2010-05-11 07:44:54 +00:00
* Thu May 06 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-3
- Now using maven2 (mvn-jpp) instead of directly calling javac & co
* Tue May 04 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-2
- Renamed from jakarta-commons-compress
2011-08-04 08:43:12 +00:00