[java-sig-commits] [apache-commons-compress] FIXED: Mistakenly patched the wrong version of the spec file before

Sandro Mathys red at fedoraproject.org
Thu Aug 4 08:58:06 UTC 2011


commit 59bb07839bf5e04d3f083c4987d9b230f0b69c30
Author: Sandro Mathys <red at fedoraproject.org>
Date:   Thu Aug 4 10:56:36 2011 +0200

    FIXED: Mistakenly patched the wrong version of the spec file before

 apache-commons-compress.spec |  105 ++++++++++++++++--------------------------
 1 files changed, 40 insertions(+), 65 deletions(-)
---
diff --git a/apache-commons-compress.spec b/apache-commons-compress.spec
index 5ae40f8..07658b9 100644
--- a/apache-commons-compress.spec
+++ b/apache-commons-compress.spec
@@ -1,40 +1,27 @@
-%global shortname commons-compress
+%global base_name       compress
+%global short_name      commons-%{base_name}
 
-Name:             apache-%{shortname}
+Name:             apache-%{short_name}
 Version:          1.2
-Release:          1%{?dist}
+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/compress/
-Source0:          http://www.apache.org/dist/commons/compress/source/%{shortname}-%{version}-src.tar.gz
+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
-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
+BuildRequires:    apache-commons-parent
 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
+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
@@ -47,50 +34,35 @@ 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
+Provides:         jakarta-%{short_name}-javadoc = %{version}-%{release}
+Obsoletes:        jakarta-%{short_name}-javadoc < 1.0-2
 
 %description javadoc
-Development documentation for %{name}.
-
+This package contains the API documentation for %{name}.
 
 %prep
-%setup -q -n %{shortname}-%{version}-src
-
+%setup -q -n %{short_name}-%{version}-src
 
 %build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mkdir -p $MAVEN_REPO_LOCAL
-mvn-jpp -e -Dmaven.repo.local=$MAVEN_REPO_LOCAL install javadoc:javadoc
-
+mvn-rpmbuild install javadoc:aggregate
 
 %install
-rm -rf $RPM_BUILD_ROOT
+# 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
 
-# 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
+# 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 $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
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
 
 
 %post
@@ -104,25 +76,29 @@ rm -rf $RPM_BUILD_ROOT
 %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
-
+%{_javadir}/*
+%{_mavenpomdir}/JPP-%{short_name}.pom
+%{_mavendepmapfragdir}/*
 
 %files javadoc
 %defattr(-,root,root,-)
-%{_javadocdir}/%{name}
+%doc LICENSE.txt NOTICE.txt
+%doc %{_javadocdir}/%{name}
 
 
 %changelog
-* Wed Oct 06 2010 Sandro Mathys <red at fedoraproject.org> - 1.2-1
-- New upstream version
+* Thu Aug 04 2011 Sandro Mathys <red at fedoraproject.org> - 1.2-2
+- Fixing mistake where different versions of the spec file got mixed up
 
-* Wed Oct 06 2010 Sandro Mathys <red at fedoraproject.org> - 1.1-1
-- New upstream version
+* Thu Aug 04 2011 Sandro Mathys <red at fedoraproject.org> - 1.2-1
+- Updated to 1.2
+
+* Sat Apr 16 2011 Chris Spike <spike at fedoraproject.org> 1.1-1
+- Updated to 1.1
+- Adapted to current java packaging guidelines
+
+* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
 * 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
@@ -145,4 +121,3 @@ rm -rf $RPM_BUILD_ROOT
 
 * Tue May 04 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-2
 - Renamed from jakarta-commons-compress
-


More information about the java-sig-commits mailing list