From f467be3c3aa2b16aa0118286abbc1e2bd73aa535 Mon Sep 17 00:00:00 2001 From: Deepak Bhole Date: Sun, 23 Jul 2006 02:14:22 +0000 Subject: [PATCH] Added conditional native compilation. Fix path where demo is located. --- .cvsignore | 5 +- junit.spec | 172 +++++++++++++++++++++++++++++-------------- junit3.8.2-build.xml | 119 ++++++++++++++++++++++++++++++ sources | 2 +- 4 files changed, 236 insertions(+), 62 deletions(-) create mode 100644 junit3.8.2-build.xml diff --git a/.cvsignore b/.cvsignore index 6bdd50d..40c0e48 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1 @@ -junit3.8.1-RHCLEAN.zip -junit3.8.1 -noarch -*.src.rpm +junit3.8.2-RHCLEAN.zip diff --git a/junit.spec b/junit.spec index 42acbd3..33e32e2 100644 --- a/junit.spec +++ b/junit.spec @@ -1,24 +1,63 @@ -%define name junit -%define version 3.8.1 -%define release 3jpp_9fc +# Copyright (c) 2000-2005, 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 _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 -Name: %{name} -Version: %{version} -Release: %{release} +Name: junit +Version: 3.8.2 +Release: 2jpp_1fc Epoch: 0 Summary: Java regression test package -License: IBM Public License +License: Common Public License Url: http://www.junit.org/ 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: jpackage-utils >= 0:1.5 -BuildRequires: coreutils -Requires(pre): coreutils +BuildRequires: jpackage-utils >= 0:1.6 +%if ! %{gcj_support} Buildarch: noarch +%endif 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 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. @@ -35,7 +74,6 @@ Documentation for %{name}. %package javadoc Group: Development/Documentation Summary: Javadoc for %{name} -Requires(post,postun): coreutils %description javadoc Javadoc for %{name}. @@ -45,6 +83,12 @@ Group: Development/Testing Summary: Demos for %{name} 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 Demonstrations and samples for %{name}. @@ -53,9 +97,8 @@ rm -rf $RPM_BUILD_ROOT %setup -q -n %{name}%{version} # extract sources jar xf src.jar -# clean binary files -find . -name "*.jar" -exec rm -f {} \; -find . -name "*.class" -exec rm -f {} \; +rm -f src.jar +cp %{SOURCE1} build.xml %build 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} cp -pr %{name}%{version}/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} # demo -install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name} -cp -pr %{name}%{version}/%{name}/* $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 + # 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 rm -rf $RPM_BUILD_ROOT -%pre -rm -f %{_javadir}/%{name}.jar - %post javadoc rm -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} @@ -87,11 +132,47 @@ if [ "$1" = "0" ]; then rm -f %{_javadocdir}/%{name} 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 %defattr(0644,root,root,0755) %doc README.html %{_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 %defattr(0644,root,root,0755) @@ -103,46 +184,23 @@ fi %files demo %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 -* Sat Jul 22 2006 Jakub Jelinek - 0:3.8.1-3jpp_9fc -- Rebuilt +* Sat Jun 22 2006 Deepak Bhole - 0:3.8.2-2jpp_1fc +- Added conditional native compilation. +- Fix path where demo is located. -* Wed Jul 12 2006 Jesse Keating - 0:3.8.1-3jpp_8fc -- rebuild - -* Thu Feb 2 2006 Archit Shah 0:3.8.1-3jpp_7fc -- added dependencies on coreutils - -* Wed Dec 21 2005 Jesse Keating 0:3.8.1-3jpp_6fc -- rebuilt again - -* Tue Dec 13 2005 Jesse Keating -- rebuilt for new gcj - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Wed Jun 22 2005 Gary Benson 0:3.8.1-3jpp_5fc -- Remove classes and jarfiles from the tarball. - -* Tue Jan 11 2005 Gary Benson 0:3.8.1-3jpp_4fc -- Reenable building of classes that require javax.swing (#130006). -- Sync with RHAPS. - -* Thu Nov 4 2004 Gary Benson 0:3.8.1-3jpp_3fc -- Build into Fedora. - -* Fri Oct 1 2004 Andrew Overholt 0:3.8.1-3jpp_3rh -- add coreutils BuildRequires - -* Fri Mar 26 2004 Frank Ch. Eigler 0:3.8.1-3jpp_2rh -- add RHUG upgrade cleanup - -* Thu Mar 4 2004 Frank Ch. Eigler 0:3.8.1-3jpp_1rh -- RH vacuuming +* Mon Mar 03 2006 Ralph Apel - 0:3.8.2-1jpp +- First JPP-1.7 release +* Sun Aug 23 2004 Randy Watler - 0:3.8.1-4jpp +- Rebuild with ant-1.6.2 * Fri May 09 2003 David Walluck 0:3.8.1-3jpp - update for JPackage 1.5 diff --git a/junit3.8.2-build.xml b/junit3.8.2-build.xml new file mode 100644 index 0000000..e6081f2 --- /dev/null +++ b/junit3.8.2-build.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sources b/sources index d417d03..0c00362 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -da35d7c6c38a728c473579af7d4f35e7 junit3.8.1-RHCLEAN.zip +517b116b00bafbde176aa0b55189c163 junit3.8.2-RHCLEAN.zip