%global shortname commons-compress Name: apache-%{shortname} Version: 1.0 Release: 5%{?dist} Summary: Java API for working with tar, zip and bzip2 files Group: Development/Libraries License: ASL 2.0 URL: http://commons.apache.org/compress/ Source0: http://www.apache.org/dist/commons/compress/source/%{shortname}-%{version}-src.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils 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 Requires: java >= 1:1.6.0 Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils # Upstream name change Provides: jakarta-%{shortname} = %{version}-%{release} Obsoletes: jakarta-%{shortname} < 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. %package javadoc Summary: Javadocs for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} Requires: jpackage-utils # Upstream name change Provides: jakarta-%{shortname}-javadoc = %{version}-%{release} Obsoletes: jakarta-%{shortname}-javadoc < 1.0-2 %description javadoc Development documentation for %{name}. %prep %setup -q -n %{shortname}-%{version}-src %build export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository mkdir -p $MAVEN_REPO_LOCAL mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL install javadoc:javadoc %install rm -rf $RPM_BUILD_ROOT # 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 # javadoc 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.maven %{name} %{version} JPP %{name} %clean rm -rf $RPM_BUILD_ROOT %post %update_maven_depmap %postun %update_maven_depmap %files %defattr(-,root,root,-) %doc LICENSE.txt NOTICE.txt %{_javadir}/%{shortname}.jar %{_javadir}/%{shortname}-%{version}.jar %{_javadir}/%{name}.jar %{_javadir}/%{name}-%{version}.jar %{_mavendepmapfragdir}/%{name} %{_mavenpomdir}/JPP-%{shortname}.pom %files javadoc %defattr(-,root,root,-) %{_javadocdir}/%{name} %changelog * Thu May 13 2010 Sandro Mathys - 1.0-5 - Added missing Provides/Obsoletes for javadocs * Mon May 10 2010 Sandro Mathys - 1.0-4 - Cleared some problems after the review * Thu May 06 2010 Sandro Mathys - 1.0-3 - Now using maven2 (mvn-jpp) instead of directly calling javac & co * Tue May 04 2010 Sandro Mathys - 1.0-2 - Renamed from jakarta-commons-compress