# 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 gcj_support 1 %define section free Name: junit Version: 3.8.2 Release: %mkrel 1.4 Epoch: 0 Summary: Java regression test package License: CPL Url: http://www.junit.org/ Group: Development/Java #Vendor: JPackage Project #Distribution: JPackage Source0: http://osdn.dl.sourceforge.net/junit/junit3.8.2.tar.bz2 Source1: junit3.8.2-build.xml BuildRequires: ant BuildRequires: jpackage-utils >= 0:1.6 %if %{gcj_support} BuildRequires: java-gcj-compat-devel %else BuildArch: noarch %endif Buildroot: %{_tmppath}/%{name}-%{version}-buildroot %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. JUnit is Open Source Software, released under the IBM Public License and hosted on SourceForge. %package manual Group: Development/Java Summary: Manual for %{name} %description manual Documentation for %{name}. %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} = %{version}-%{release} %description demo Demonstrations and samples for %{name}. %prep %setup -q -n %{name}%{version} # extract sources %{jar} xf src.jar cp %{SOURCE1} build.xml # javadoc fails if stylesheet.css is not there >stylesheet.css %build %ant dist %install %{__rm} -rf %{buildroot} # jars install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -m 644 %{name}%{version}/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done) # javadoc 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} %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif # fix end-of-line %{__perl} -pi -e 's/\r\n/\n/g' README.html for i in `find %{name}%{version}/doc -type f -name "*.htm*"`; do %{__perl} -pi -e 's/\r\n/\n/g' $i done for i in `find $RPM_BUILD_ROOT%{_datadir}/%{name} -type f -name "*.java"`; do %{__perl} -pi -e 's/\r\n/\n/g' $i done %clean rm -rf $RPM_BUILD_ROOT %if %{gcj_support} %post %{update_gcjdb} %postun %{clean_gcjdb} %endif %post javadoc rm -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} %postun javadoc if [ "$1" = "0" ]; then rm -f %{_javadocdir}/%{name} fi %files %defattr(0644,root,root,0755) %doc README.html %{_javadir}/* %if %{gcj_support} %attr(-,root,root) %{_libdir}/gcj/%{name} %endif %dir %{_datadir}/%{name} %files manual %defattr(0644,root,root,0755) %doc %{name}%{version}/doc/* %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{name}-%{version} %files demo %defattr(0644,root,root,0755) %{_datadir}/%{name}/* %changelog * Sat Sep 15 2007 Anssi Hannula <anssi@mandriva.org> 3.8.2-1.4mdv2008.0 + Revision: 87450 - rebuild to filter out autorequires of GCJ AOT objects - remove unnecessary Requires(post) on java-gcj-compat * Fri Sep 14 2007 Pascal Terjan <pterjan@mandriva.org> 0:3.8.2-1.3mdv2008.0 + Revision: 85729 - Fix build and rebuild for new gcj * Thu Mar 15 2007 Christiaan Welvaart <spturtle@mandriva.org> 3.8.2-1.2mdv2007.1 + Revision: 144260 - rebuild for 2007.1 - Import junit * Sun Jul 23 2006 David Walluck <walluck@mandriva.org> 0:3.8.2-1.1mdv2007.0 - 3.8.2 * Fri Jun 02 2006 David Walluck <walluck@mandriva.org> 0:3.8.1-4.2mdv2006.0 - rebuild for libgcj.so.7 - aot compile * Sun May 08 2005 David Walluck <walluck@mandriva.org> 0:3.8.1-4.1mdk - release * Tue Aug 24 2004 Randy Watler <rwatler at finali.com> - 0:3.8.1-4jpp - Rebuild with ant-1.6.2