[apache-commons-cli] Update for newer guidelines

mbooth mbooth at fedoraproject.org
Mon Aug 5 10:21:37 UTC 2013


commit a8e8d6a64561a08d1944541b1f9bdead38d8aeb9
Author: Mat Booth <fedora at matbooth.co.uk>
Date:   Mon Aug 5 11:20:49 2013 +0100

    Update for newer guidelines
    
    - Drop ancient obsoletes/provides on old jakarta name

 apache-commons-cli.spec |   50 ++++++++++++++++-------------------------------
 1 files changed, 17 insertions(+), 33 deletions(-)
---
diff --git a/apache-commons-cli.spec b/apache-commons-cli.spec
index 36801f6..a39cefc 100644
--- a/apache-commons-cli.spec
+++ b/apache-commons-cli.spec
@@ -1,14 +1,13 @@
-%global base_name       cli
-%global short_name      commons-%{base_name}
+%global short_name      commons-cli
 
 Name:             apache-%{short_name}
 Version:          1.2
-Release:          10%{?dist}
+Release:          11%{?dist}
 Summary:          Command Line Interface Library for Java
 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
+URL:              http://commons.apache.org/cli/
+Source0:          http://www.apache.org/dist/commons/cli/source/%{short_name}-%{version}-src.tar.gz
 BuildArch:        noarch
 
 BuildRequires:    java-devel >= 1:1.6.0
@@ -18,10 +17,6 @@ BuildRequires:    maven-local
 Requires:         java >= 1:1.6.0
 Requires:         jpackage-utils
 
-# This should go away with F-17
-Provides:         jakarta-%{short_name} = 0:%{version}-%{release}
-Obsoletes:        jakarta-%{short_name} < 0:1.1-6
-
 %description
 The CLI library provides a simple and easy to use API for working with the 
 command line arguments and options.
@@ -30,8 +25,6 @@ command line arguments and options.
 Summary:          Javadoc for %{name}
 Group:            Documentation
 Requires:         jpackage-utils
-# This should go away with F-17
-Obsoletes:        jakarta-%{short_name}-javadoc < 0:1.1-6
 
 %description javadoc
 This package contains the API documentation for %{name}.
@@ -39,36 +32,27 @@ This package contains the API documentation for %{name}.
 %prep
 %setup -q -n %{short_name}-%{version}-src
 
+# Compatibility links
+%mvn_alias "%{short_name}:%{short_name}" "org.apache.commons:%{short_name}"
+%mvn_file :commons-cli %{short_name} %{name}
+
 %build
-mvn-rpmbuild install javadoc:javadoc
+%mvn_build
 
 %install
-# jars
-install -d -m 0755 %{buildroot}%{_javadir}
-install -pm 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
-(cd %{buildroot}%{_javadir} && for jar in *%{name}*; do ln -sf ${jar} `echo $jar| sed  "s|apache-||g"`; done)
-
-# pom
-install -d -m 755 %{buildroot}%{_mavenpomdir}
-install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.apache.commons:%{short_name}"
+%mvn_install
 
-# javadoc
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
-cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
-
-%files
+%files -f .mfiles
 %doc LICENSE.txt NOTICE.txt README.txt RELEASE-NOTES.txt
-%{_javadir}/*
-%{_mavenpomdir}/*
-%{_mavendepmapfragdir}/*
-
-%files javadoc
-%doc LICENSE.txt
-%{_javadocdir}/%{name}
 
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE.txt NOTICE.txt
 
 %changelog
+* Mon Aug 05 2013 Mat Booth <fedora at matbooth.co.uk> - 1.2-11
+- Update for newer guidelines
+- Drop ancient obsoletes/provides on old jakarta name
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list