Added conditional native compilation. Fix path where demo is located.
This commit is contained in:
parent
f0b06755a7
commit
f467be3c3a
@ -1,4 +1 @@
|
|||||||
junit3.8.1-RHCLEAN.zip
|
junit3.8.2-RHCLEAN.zip
|
||||||
junit3.8.1
|
|
||||||
noarch
|
|
||||||
*.src.rpm
|
|
||||||
|
172
junit.spec
172
junit.spec
@ -1,24 +1,63 @@
|
|||||||
%define name junit
|
# Copyright (c) 2000-2005, JPackage Project
|
||||||
%define version 3.8.1
|
# All rights reserved.
|
||||||
%define release 3jpp_9fc
|
#
|
||||||
|
# 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 _with_gcj_support 1
|
||||||
|
|
||||||
|
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
|
||||||
|
|
||||||
%define section free
|
%define section free
|
||||||
|
|
||||||
Name: %{name}
|
Name: junit
|
||||||
Version: %{version}
|
Version: 3.8.2
|
||||||
Release: %{release}
|
Release: 2jpp_1fc
|
||||||
Epoch: 0
|
Epoch: 0
|
||||||
Summary: Java regression test package
|
Summary: Java regression test package
|
||||||
License: IBM Public License
|
License: Common Public License
|
||||||
Url: http://www.junit.org/
|
Url: http://www.junit.org/
|
||||||
Group: Development/Testing
|
Group: Development/Testing
|
||||||
Source: junit3.8.1-RHCLEAN.zip
|
#http://osdn.dl.sourceforge.net/junit/junit3.8.2.zip
|
||||||
|
Source0: junit3.8.2-RHCLEAN.zip
|
||||||
|
Source1: junit3.8.2-build.xml
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: jpackage-utils >= 0:1.5
|
BuildRequires: jpackage-utils >= 0:1.6
|
||||||
BuildRequires: coreutils
|
%if ! %{gcj_support}
|
||||||
Requires(pre): coreutils
|
|
||||||
Buildarch: noarch
|
Buildarch: noarch
|
||||||
|
%endif
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-buildroot
|
Buildroot: %{_tmppath}/%{name}-%{version}-buildroot
|
||||||
|
|
||||||
|
%if %{gcj_support}
|
||||||
|
BuildRequires: java-gcj-compat-devel
|
||||||
|
Requires(post): java-gcj-compat
|
||||||
|
Requires(postun): java-gcj-compat
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
JUnit is a regression testing framework written by Erich Gamma and Kent
|
JUnit is a regression testing framework written by Erich Gamma and Kent
|
||||||
Beck. It is used by the developer who implements unit tests in Java.
|
Beck. It is used by the developer who implements unit tests in Java.
|
||||||
@ -35,7 +74,6 @@ Documentation for %{name}.
|
|||||||
%package javadoc
|
%package javadoc
|
||||||
Group: Development/Documentation
|
Group: Development/Documentation
|
||||||
Summary: Javadoc for %{name}
|
Summary: Javadoc for %{name}
|
||||||
Requires(post,postun): coreutils
|
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
Javadoc for %{name}.
|
Javadoc for %{name}.
|
||||||
@ -45,6 +83,12 @@ Group: Development/Testing
|
|||||||
Summary: Demos for %{name}
|
Summary: Demos for %{name}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%if %{gcj_support}
|
||||||
|
BuildRequires: java-gcj-compat-devel
|
||||||
|
Requires(post): java-gcj-compat
|
||||||
|
Requires(postun): java-gcj-compat
|
||||||
|
%endif
|
||||||
|
|
||||||
%description demo
|
%description demo
|
||||||
Demonstrations and samples for %{name}.
|
Demonstrations and samples for %{name}.
|
||||||
|
|
||||||
@ -53,9 +97,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%setup -q -n %{name}%{version}
|
%setup -q -n %{name}%{version}
|
||||||
# extract sources
|
# extract sources
|
||||||
jar xf src.jar
|
jar xf src.jar
|
||||||
# clean binary files
|
rm -f src.jar
|
||||||
find . -name "*.jar" -exec rm -f {} \;
|
cp %{SOURCE1} build.xml
|
||||||
find . -name "*.class" -exec rm -f {} \;
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
ant dist
|
ant dist
|
||||||
@ -69,15 +112,17 @@ install -m 644 %{name}%{version}/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-
|
|||||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||||
cp -pr %{name}%{version}/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
cp -pr %{name}%{version}/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||||
# demo
|
# demo
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
|
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/demo/junit # Not using %name for last part because it is
|
||||||
cp -pr %{name}%{version}/%{name}/* $RPM_BUILD_ROOT%{_datadir}/%{name}
|
# part of package name
|
||||||
|
cp -pr %{name}%{version}/%{name}/* $RPM_BUILD_ROOT%{_datadir}/%{name}/demo/junit
|
||||||
|
|
||||||
|
%if %{gcj_support}
|
||||||
|
%{_bindir}/aot-compile-rpm
|
||||||
|
%endif
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%pre
|
|
||||||
rm -f %{_javadir}/%{name}.jar
|
|
||||||
|
|
||||||
%post javadoc
|
%post javadoc
|
||||||
rm -f %{_javadocdir}/%{name}
|
rm -f %{_javadocdir}/%{name}
|
||||||
ln -s %{name}-%{version} %{_javadocdir}/%{name}
|
ln -s %{name}-%{version} %{_javadocdir}/%{name}
|
||||||
@ -87,11 +132,47 @@ if [ "$1" = "0" ]; then
|
|||||||
rm -f %{_javadocdir}/%{name}
|
rm -f %{_javadocdir}/%{name}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%post
|
||||||
|
%if %{gcj_support}
|
||||||
|
if [ -x %{_bindir}/rebuild-gcj-db ]
|
||||||
|
then
|
||||||
|
%{_bindir}/rebuild-gcj-db
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%if %{gcj_support}
|
||||||
|
if [ -x %{_bindir}/rebuild-gcj-db ]
|
||||||
|
then
|
||||||
|
%{_bindir}/rebuild-gcj-db
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post demo
|
||||||
|
%if %{gcj_support}
|
||||||
|
if [ -x %{_bindir}/rebuild-gcj-db ]
|
||||||
|
then
|
||||||
|
%{_bindir}/rebuild-gcj-db
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%postun demo
|
||||||
|
%if %{gcj_support}
|
||||||
|
if [ -x %{_bindir}/rebuild-gcj-db ]
|
||||||
|
then
|
||||||
|
%{_bindir}/rebuild-gcj-db
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%doc README.html
|
%doc README.html
|
||||||
%{_javadir}/*
|
%{_javadir}/*
|
||||||
%dir %{_datadir}/%{name}
|
|
||||||
|
%if %{gcj_support}
|
||||||
|
%dir %{_libdir}/gcj/%{name}
|
||||||
|
%attr(-,root,root) %{_libdir}/gcj/%{name}/junit-3.8.2.jar.*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files manual
|
%files manual
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
@ -103,46 +184,23 @@ fi
|
|||||||
|
|
||||||
%files demo
|
%files demo
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%{_datadir}/%{name}/*
|
%{_datadir}/%{name}
|
||||||
|
|
||||||
|
%if %{gcj_support}
|
||||||
|
%dir %{_libdir}/gcj/%{name}
|
||||||
|
%attr(-,root,root) %{_libdir}/gcj/%{name}/demo.*
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:3.8.1-3jpp_9fc
|
* Sat Jun 22 2006 Deepak Bhole <dbhole@redhat.com> - 0:3.8.2-2jpp_1fc
|
||||||
- Rebuilt
|
- Added conditional native compilation.
|
||||||
|
- Fix path where demo is located.
|
||||||
|
|
||||||
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0:3.8.1-3jpp_8fc
|
* Mon Mar 03 2006 Ralph Apel <r.apel at r-apel.de> - 0:3.8.2-1jpp
|
||||||
- rebuild
|
- First JPP-1.7 release
|
||||||
|
|
||||||
* Thu Feb 2 2006 Archit Shah <ashah@redhat.com> 0:3.8.1-3jpp_7fc
|
|
||||||
- added dependencies on coreutils
|
|
||||||
|
|
||||||
* Wed Dec 21 2005 Jesse Keating <jkeating@redhat.com> 0:3.8.1-3jpp_6fc
|
|
||||||
- rebuilt again
|
|
||||||
|
|
||||||
* Tue Dec 13 2005 Jesse Keating <jkeating@redhat.com>
|
|
||||||
- rebuilt for new gcj
|
|
||||||
|
|
||||||
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
|
|
||||||
- rebuilt
|
|
||||||
|
|
||||||
* Wed Jun 22 2005 Gary Benson <gbenson@redhat.com> 0:3.8.1-3jpp_5fc
|
|
||||||
- Remove classes and jarfiles from the tarball.
|
|
||||||
|
|
||||||
* Tue Jan 11 2005 Gary Benson <gbenson@redhat.com> 0:3.8.1-3jpp_4fc
|
|
||||||
- Reenable building of classes that require javax.swing (#130006).
|
|
||||||
- Sync with RHAPS.
|
|
||||||
|
|
||||||
* Thu Nov 4 2004 Gary Benson <gbenson@redhat.com> 0:3.8.1-3jpp_3fc
|
|
||||||
- Build into Fedora.
|
|
||||||
|
|
||||||
* Fri Oct 1 2004 Andrew Overholt <overholt@redhat.com> 0:3.8.1-3jpp_3rh
|
|
||||||
- add coreutils BuildRequires
|
|
||||||
|
|
||||||
* Fri Mar 26 2004 Frank Ch. Eigler <fche@redhat.com> 0:3.8.1-3jpp_2rh
|
|
||||||
- add RHUG upgrade cleanup
|
|
||||||
|
|
||||||
* Thu Mar 4 2004 Frank Ch. Eigler <fche@redhat.com> 0:3.8.1-3jpp_1rh
|
|
||||||
- RH vacuuming
|
|
||||||
|
|
||||||
|
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:3.8.1-4jpp
|
||||||
|
- Rebuild with ant-1.6.2
|
||||||
* Fri May 09 2003 David Walluck <david@anti-microsoft.org> 0:3.8.1-3jpp
|
* Fri May 09 2003 David Walluck <david@anti-microsoft.org> 0:3.8.1-3jpp
|
||||||
- update for JPackage 1.5
|
- update for JPackage 1.5
|
||||||
|
|
||||||
|
119
junit3.8.2-build.xml
Normal file
119
junit3.8.2-build.xml
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
<!-- JUnit build script using ant 1.4 -->
|
||||||
|
<project name="junit" default="dist" basedir=".">
|
||||||
|
<property file="${user.home}/.junit.properties" />
|
||||||
|
<property name="build.compiler" value="classic" />
|
||||||
|
<property name="version" value="3.8.2" />
|
||||||
|
<property name="dist" value="junit${version}" />
|
||||||
|
<property name="versionfile" value="junit/runner/Version.java" />
|
||||||
|
<property name="zipfile" value="${dist}.zip" />
|
||||||
|
<target name="init">
|
||||||
|
<tstamp/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="versiontag" depends="init">
|
||||||
|
<filter token="version" value="${version}" />
|
||||||
|
<copy
|
||||||
|
file="${versionfile}"
|
||||||
|
tofile="${versionfile}tmp"
|
||||||
|
filtering="on"
|
||||||
|
/>
|
||||||
|
<move file="${versionfile}tmp" tofile="${versionfile}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="build" depends="versiontag">
|
||||||
|
<javac
|
||||||
|
srcdir="."
|
||||||
|
destdir="."
|
||||||
|
debug="on"
|
||||||
|
/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="dist" depends="build">
|
||||||
|
<delete dir="${dist}" />
|
||||||
|
<mkdir dir="${dist}" />
|
||||||
|
<jar
|
||||||
|
jarfile="${dist}/src.jar"
|
||||||
|
basedir="."
|
||||||
|
excludes="**/*.jar, junit/tests/**, junit/samples/**, **/*.class, doc/**, README.html, .classpath, .project, cpl-v10.html"
|
||||||
|
/>
|
||||||
|
<jar
|
||||||
|
jarfile="${dist}/junit.jar"
|
||||||
|
basedir="."
|
||||||
|
excludes="**/*.jar, junit/tests/**, junit/samples/**, **/*.java, doc/**, README.html, build.xml, jar-manifest.txt, .classpath, .project, cpl-v10.html"
|
||||||
|
/>
|
||||||
|
<copy todir="${dist}/junit/samples">
|
||||||
|
<fileset dir="junit/samples" />
|
||||||
|
</copy>
|
||||||
|
<copy todir="${dist}/junit/tests">
|
||||||
|
<fileset dir="junit/tests" />
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
|
||||||
|
<delete file="${dist}/junit/tests/runner/test.jar"/>
|
||||||
|
<jar jarfile="${dist}/junit/tests/runner/test.jar"
|
||||||
|
basedir="."
|
||||||
|
includes="junit/tests/runner/LoadedFromJar.class"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<mkdir dir="${dist}/javadoc" />
|
||||||
|
<javadoc
|
||||||
|
sourcepath="."
|
||||||
|
packagenames="junit.framework.*, junit.extensions.*"
|
||||||
|
destdir="${dist}/javadoc"
|
||||||
|
author="false"
|
||||||
|
version="false"
|
||||||
|
use="false"
|
||||||
|
windowtitle="JUnit API"
|
||||||
|
stylesheetfile="stylesheet.css"
|
||||||
|
/>
|
||||||
|
<copy todir="${dist}/doc">
|
||||||
|
<fileset dir="doc"/>
|
||||||
|
</copy>
|
||||||
|
<copy file="README.html" tofile="${dist}/README.html" />
|
||||||
|
<copy file="cpl-v10.html" tofile="${dist}/cpl-v10.html" />
|
||||||
|
|
||||||
|
<java classname="junit.textui.TestRunner" fork="yes">
|
||||||
|
<arg value="junit.samples.AllTests" />
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${dist}" />
|
||||||
|
<pathelement location="${dist}/junit.jar" />
|
||||||
|
</classpath>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="zip" depends="dist">
|
||||||
|
<zip
|
||||||
|
zipfile="${zipfile}"
|
||||||
|
basedir="."
|
||||||
|
includes="${dist}/**"
|
||||||
|
/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="awtui" depends="dist">
|
||||||
|
<java classname="junit.awtui.TestRunner" fork="yes">
|
||||||
|
<arg value="junit.samples.AllTests" />
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${dist}" />
|
||||||
|
<pathelement location="${dist}/junit.jar" />
|
||||||
|
</classpath>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="swingui" depends="dist">
|
||||||
|
<java classname="junit.swingui.TestRunner" fork="yes">
|
||||||
|
<arg value="junit.samples.AllTests" />
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${dist}" />
|
||||||
|
<pathelement location="${dist}/junit.jar" />
|
||||||
|
</classpath>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${dist}" quiet="true"/>
|
||||||
|
<delete file="${zipfile}" quiet="true"/>
|
||||||
|
<delete>
|
||||||
|
<fileset dir="${basedir}" includes="**/*.class" />
|
||||||
|
</delete>
|
||||||
|
</target>
|
||||||
|
</project>
|
Loading…
Reference in New Issue
Block a user