# Copyright (c) 2000-2008, 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 section free Name: junit-addons Version: 1.4 Release: %mkrel 9 Epoch: 0 Summary: JUnitX helper classes for JUnit Group: Development/Java License: ASL 1.1 Url: http://sourceforge.net/projects/junit-addons/ Source0: %{name}-%{version}.zip Source1: %{name}-build.xml Source2: http://mirrors.ibiblio.org/pub/mirrors/maven2/junit-addons/junit-addons/%{version}/junit-addons-%{version}.pom Requires: ant Requires: apache-commons-logging Requires: jaxen Requires: jdom Requires: junit Requires: xerces-j2 BuildRequires: ant BuildRequires: apache-commons-logging BuildRequires: jaxen BuildRequires: jdom BuildRequires: junit BuildRequires: xerces-j2 BuildRequires: xml-commons-apis BuildRequires: java-rpmbuild BuildRequires: unzip BuildArch: noarch %description JUnit-addons is a collection of helper classes for JUnit. This library can be used with both JUnit 3.7 and JUnit 3.8.x %package javadoc Summary: Javadoc for %{name} Group: Development/Java %description javadoc Javadoc for %{name}. %prep %setup -q %{__chmod} -Rf a+rX,u+w,g-w,o-w * %{jar} xf src.jar # FIXME: (dwalluck): removing this jar (which contains bianry class files) will break the tests find . -type f -name "*.jar" -a -type f -not -name tests.jar | xargs -t rm cp -p %{SOURCE1} build.xml %build export CLASSPATH= export OPT_JAR_LIST=: %{ant} \ -Dant.build.javac.source=1.4 \ -Djdom.jar=$(build-classpath jdom) \ -Djaxen.jar=$(build-classpath jaxen) \ -Dsaxpath.jar=$(build-classpath jaxen) \ -Dant.jar=$(build-classpath ant) \ -Djunit.jar=$(build-classpath junit) \ -Dxerces.jar=$(build-classpath xerces-j2) \ -Dxml-apis.jar=$(build-classpath xml-commons-jaxp-1.3-apis) \ -Dcommons-logging.jar=$(build-classpath commons-logging) \ -Dproject.name=junit-addons \ -Dproject.version=%{version} \ release %install rm -rf $RPM_BUILD_ROOT # jars install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -m 644 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) # examples install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name} install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/examples cp -pr src/example/* $RPM_BUILD_ROOT%{_datadir}/%{name}/examples # javadoc install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -pr api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom %add_to_maven_depmap %{name} %{name} %{version} JPP %{name} %clean rm -rf $RPM_BUILD_ROOT %post %update_maven_depmap %postun %update_maven_depmap %files %doc LICENSE README WHATSNEW %{_javadir}/%{name}-%{version}.jar %{_javadir}/%{name}.jar %{_datadir}/%{name} %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %files javadoc %{_javadocdir}/%{name} %changelog * Sat Jan 12 2013 umeabot <umeabot> 0:1.4-9.mga3 + Revision: 355699 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Sep 07 2011 gil <gil> 0:1.4-8.mga2 + Revision: 140603 - added maven2 pom * Tue Jan 25 2011 dmorgan <dmorgan> 0:1.4-7.mga1 + Revision: 39385 - Fix BuildRequires - Adapt for mageia - imported package junit-addons