From 082709f53b9426863f84a89c4d3b3556cd9ac587 Mon Sep 17 00:00:00 2001 From: mbooth Date: Thu, 10 Feb 2011 00:23:42 +0000 Subject: [PATCH] Drop versioned jars and javadocs. --- apache-commons-codec.spec | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/apache-commons-codec.spec b/apache-commons-codec.spec index dd38662..4d167ed 100644 --- a/apache-commons-codec.spec +++ b/apache-commons-codec.spec @@ -8,7 +8,7 @@ Name: apache-%{short_name} Version: 1.4 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Implementations of common encoders and decoders Group: Development/Libraries License: ASL 2.0 @@ -68,21 +68,21 @@ sed -i 's/\r//' RELEASE-NOTES*.txt LICENSE.txt NOTICE.txt export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository mkdir -p $MAVEN_REPO_LOCAL -mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL install javadoc:javadoc +mvn-jpp \ + -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ + install javadoc:javadoc %install rm -rf %{buildroot} # jars install -pD -T target/%{short_name}-%{version}.jar \ - %{buildroot}%{_javadir}/%{short_name}-%{version}.jar -(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|%{short_name}|%{name}|g"`; done) -(cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) + %{buildroot}%{_javadir}/%{short_name}.jar +(cd %{buildroot}%{_javadir} && for jar in *; do ln -sf ${jar} `echo $jar| sed "s|%{short_name}|%{name}|g"`; done) # javadocs -install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version} -cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version} -ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} # pom install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom @@ -101,6 +101,11 @@ rm -rf %{buildroot} %postun %update_maven_depmap +%pre javadoc +# workaround for rpm bug, can be removed in F-17 +[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \ +rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : + %files %defattr(-,root,root,-) %doc LICENSE.txt NOTICE.txt RELEASE-NOTES* @@ -110,10 +115,13 @@ rm -rf %{buildroot} %files javadoc %defattr(-,root,root,-) -%{_javadocdir}/%{name}-%{version} +%doc LICENSE.txt %{_javadocdir}/%{name} %changelog +* Thu Feb 10 2011 mbooth 1.4-12 +- Drop versioned jars and javadocs. + * Mon Feb 07 2011 Fedora Release Engineering - 1.4-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild