From 1cd4f4c555cc2341c8433f0811a4383dd322f74a Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 18 Jun 2013 16:10:33 +0200 Subject: [PATCH] Update to current packaging guidelines --- jsr-305.spec | 65 ++++++++++++---------------------------------------- 1 file changed, 15 insertions(+), 50 deletions(-) diff --git a/jsr-305.spec b/jsr-305.spec index 01ec440..20b4889 100644 --- a/jsr-305.spec +++ b/jsr-305.spec @@ -3,11 +3,12 @@ Version: 0 Release: 0.14.20090319svn%{?dist} Summary: Correctness annotations for Java code -Group: Development/Libraries # The majority of code is BSD-licensed, but some Java sources # are licensed under CC-BY license, see: $ grep -r Creative . License: BSD and CC-BY URL: http://jsr-305.googlecode.com/ +BuildArch: noarch + # There has been no official release yet. This is a snapshot of the Subversion # repository as of 19 Mar 2009. Use the following commands to generate the # tarball: @@ -18,25 +19,10 @@ Source0: jsr-305-0.4.20090319.tar.xz # File containing URL to CC-BY license text Source1: NOTICE-CC-BY.txt - -BuildRequires: java >= 0:1.6.0 -BuildRequires: jpackage-utils, maven-local -BuildRequires: maven-compiler-plugin -BuildRequires: maven-install-plugin -BuildRequires: maven-jar-plugin -BuildRequires: maven-javadoc-plugin -BuildRequires: maven-resources-plugin -BuildRequires: maven-site-plugin -BuildRequires: maven-surefire-plugin -BuildRequires: maven-surefire-provider-junit -Requires: java, jpackage-utils - -BuildArch: noarch +BuildRequires: maven-local %package javadoc Summary: Javadoc documentation for %{name} -Group: Documentation -Requires: jpackage-utils %description This package contains reference implementations, test cases, and other @@ -48,52 +34,31 @@ This package contains the API documentation for %{name}. %prep %setup -q -n %{name} -sed -i 's/\r//' sampleUses/pom.xml - cp %{SOURCE1} NOTICE-CC-BY +%mvn_file :ri %{name} +%mvn_alias :ri com.google.code.findbugs:jsr305 +%mvn_package ":{proposedAnnotations,tcl}" __noinstall + # do not build sampleUses module - it causes Javadoc generation to fail -sed -i '/sampleUses<\/module>/d' pom.xml +%pom_disable_module sampleUses %build -mvn-rpmbuild install javadoc:aggregate +%mvn_build %install +%mvn_install -# JAR files -mkdir -p $RPM_BUILD_ROOT%{_javadir} -cp -p ri/target/ri-0.1-SNAPSHOT.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar - -# Javadocs -mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} -cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/ - -# pom -mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir} -install -pm 644 ri/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom -%add_maven_depmap JPP-%{name}.pom %{name}.jar -a 'com.google.code.findbugs:jsr305' - -install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}-parent.pom -%add_maven_depmap JPP-%{name}-parent.pom - - -%pre javadoc -# workaround for rpm bug 646523 (can be removed in F-17) -[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \ -rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : - -%files +%files -f .mfiles %doc ri/LICENSE NOTICE-CC-BY sampleUses -%{_mavenpomdir}/JPP-%{name}.pom -%{_mavenpomdir}/JPP-%{name}-parent.pom -%{_javadir}/%{name}.jar -%{_mavendepmapfragdir}/%{name} -%files javadoc +%files javadoc -f .mfiles-javadoc %doc ri/LICENSE NOTICE-CC-BY -%{_javadocdir}/%{name} %changelog +* Tue Jun 18 2013 Mikolaj Izdebski - 0-0.14.20090319svn +- Update to current packaging guidelines + * Tue Jun 18 2013 Michal Srb - 0-0.14.20090319svn - Install license file with javadoc subpackage (Resolves: rhbz#975411) - Add file containing link to CC-BY license text