# Copyright (c) 2000-2007, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # %define gcj_support 1 Name: junitperf Version: 1.9.1 Release: %mkrel 2.1.10 Epoch: 0 Summary: JUnit extension for performance and scalability testing License: BSD Group: Development/Java Source0: http://www.clarkware.com/software/junitperf-1.9.1.zip Source1: junitperf-%{version}.pom URL: http://www.clarkware.com/software/JUnitPerf.html BuildRequires: ant, ant-junit, junit >= 0:3.2, java-rpmbuild >= 0:1.6, java-devel %if %{gcj_support} BuildRequires: java-gcj-compat-devel %else BuildArch: noarch BuildRequires: java-devel %endif Requires: jpackage-utils Requires: junit >= 0:3.2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description JUnitPerf is a collection of JUnit test decorators used to measure the performance and scalability of functionality contained within existing JUnit tests. %package javadoc Group: Development/Java Summary: Javadoc for %{name} %description javadoc Javadoc for %{name}. %package demo Group: Development/Java Summary: Demos for %{name} Requires: %{name} = %{epoch}:%{version}-%{release} %description demo Demonstrations and samples for %{name}. # ----------------------------------------------------------------------------- %prep %setup -q -n %{name}-%{version} # remove all binary libs find . -name "*.jar" -exec rm -f {} \; # ----------------------------------------------------------------------------- %build CLASSPATH=$(build-classpath junit) %{ant} -Dbuild.sysclasspath=first jar test javadoc # ----------------------------------------------------------------------------- %install rm -rf $RPM_BUILD_ROOT # jars install -d -m 0755 $RPM_BUILD_ROOT%{_javadir} install -m 0644 dist/%{name}-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom %add_maven_depmap JPP-%{name}.pom %{name}.jar # javadoc install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr build/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # demo install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/%{name} cp -pr samples $RPM_BUILD_ROOT%{_datadir}/%{name} %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif # ----------------------------------------------------------------------------- %clean rm -rf $RPM_BUILD_ROOT %post %update_maven_depmap %if %{gcj_support} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %postun %update_maven_depmap %if %{gcj_support} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif # ----------------------------------------------------------------------------- %files %defattr(0644,root,root,0755) %doc LICENSE README docs/JUnitPerf.html %{_javadir}/* %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %if %{gcj_support} %dir %{_libdir}/gcj/%{name} %attr(-,root,root) %{_libdir}/gcj/%{name}/* %endif %files javadoc %defattr(0644,root,root,0755) %doc %{_javadocdir}/* %files demo %defattr(0644,root,root,0755) %{_datadir}/%{name} # ----------------------------------------------------------------------------- %changelog * Sat Jan 12 2013 umeabot <umeabot> 0:1.9.1-2.1.10.mga3 + Revision: 355722 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Aug 09 2011 gil <gil> 0:1.9.1-2.1.9.mga2 + Revision: 132410 - added maven2 pom * Mon Jan 17 2011 dmorgan <dmorgan> 0:1.9.1-2.1.8.mga1 + Revision: 21222 - imported package junitperf