[junitperf] Install with maven

Mat Booth mbooth at fedoraproject.org
Mon Jun 9 09:54:32 UTC 2014


commit 4b0c432d72bf0c11f66a7d1db4445d3db1b03eb9
Author: Mat Booth <mat.booth at redhat.com>
Date:   Mon Jun 9 10:54:18 2014 +0100

    Install with maven
    
    - Fix bogus date in changelog
    - Drop ancient javadoc/rpm bug workaround

 .gitignore     |    9 +++++++--
 junitperf.spec |   40 ++++++++++++++++------------------------
 2 files changed, 23 insertions(+), 26 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6361efa..de00bfe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,7 @@
-junitperf-1.9.1.zip
-/junitperf-1.9.1.pom
+/junitperf-*/
+/junitperf-*.zip
+/junitperf-*.pom
+/noarch
+/.project
+/.build-*.log
+/*.src.rpm
diff --git a/junitperf.spec b/junitperf.spec
index 696ee05..5d714f8 100644
--- a/junitperf.spec
+++ b/junitperf.spec
@@ -30,20 +30,18 @@
 
 Name:           junitperf
 Version:        1.9.1
-Release:        14%{?dist}
+Release:        15%{?dist}
 Summary:        JUnit extension for performance and scalability testing
 License:        BSD
-Group:          Development/Libraries
 Source0:        http://www.clarkware.com/software/junitperf-1.9.1.zip
 Source1:        https://repository.jboss.org/nexus/content/repositories/thirdparty-uploads/junitperf/junitperf/%{version}/junitperf-%{version}.pom
 URL:            http://www.clarkware.com/software/JUnitPerf.html
 BuildRequires:  ant
 BuildRequires:  ant-junit
 BuildRequires:  java-devel
-BuildRequires:  jpackage-utils
+BuildRequires:  javapackages-local
 BuildRequires:  junit >= 3.2
 BuildArch:      noarch
-Requires:       jpackage-utils
 Requires:       junit >= 3.2
 
 %description
@@ -52,15 +50,12 @@ performance and scalability of functionality contained within existing
 JUnit tests.
 
 %package javadoc
-Group:          Documentation
 Summary:        API documentation for %{name}
-Requires:       jpackage-utils
 
 %description javadoc
 %{summary}.
 
 %package demo
-Group:          Documentation
 Summary:        Demos and samples for %{name}
 Requires:       %{name} = %{version}-%{release}
 
@@ -72,18 +67,16 @@ Requires:       %{name} = %{version}-%{release}
 
 # remove all binary libs
 find . -name "*.jar" -exec rm -f {} \;
+find . -name "*.class" -exec rm -f {} \;
 
 %build
 CLASSPATH=$(build-classpath junit) ant -Dbuild.sysclasspath=first jar test javadoc
 
-%install
-# jar
-install -pD -T dist/%{name}-%{version}.jar \
-  %{buildroot}%{_javadir}/%{name}.jar
+# request maven artifact installation
+%mvn_artifact %{SOURCE1} dist/junitperf-%{version}.jar
 
-install -d -m 0755 %{buildroot}%{_mavenpomdir}
-install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-%add_maven_depmap JPP-%{name}.pom %{name}.jar
+%install
+%mvn_install
 
 # javadoc
 install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
@@ -93,16 +86,9 @@ cp -pr build/docs/api/* %{buildroot}%{_javadocdir}/%{name}
 install -d -m 0755 %{buildroot}%{_datadir}/%{name}
 cp -pr samples %{buildroot}%{_datadir}/%{name}
 
-%pre javadoc
-# workaround for rpm bug, can be removed in F-18
-[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
-rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
-
-%files
+%files -f .mfiles
 %doc LICENSE README docs/JUnitPerf.html
-%{_javadir}/%{name}.jar
-%{_mavenpomdir}/JPP-%{name}.pom
-%{_mavendepmapfragdir}/%{name}
+%dir %{_javadir}/%{name}
 
 %files javadoc
 %doc LICENSE
@@ -113,6 +99,11 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
 %{_datadir}/%{name}
 
 %changelog
+* Mon Jun 09 2014 Mat Booth <mat.booth at redhat.com> - 1.9.1-15
+- Install with maven
+- Fix bogus date in changelog
+- Drop ancient javadoc/rpm bug workaround
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.9.1-14
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
@@ -156,8 +147,9 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
 - Upgrade to 1.9.1
 - Add javadoc ghost symlink and post/postun
 
-* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.8-3jpp
+* Mon Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.8-3jpp
 - Rebuild with ant-1.6.2
+
 * Thu Mar 27 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.8-2jpp
 - Adapted to JPackage 1.5.
 


More information about the scm-commits mailing list