Author: pawelz                       Date: Wed Apr  1 17:50:31 2009 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added jdk bconds
- changed Name to java-junit

---- Files affected:
SPECS:
   java-junit.spec (1.26 -> 1.27) 

---- Diffs:

================================================================
Index: SPECS/java-junit.spec
diff -u SPECS/java-junit.spec:1.26 SPECS/java-junit.spec:1.27
--- SPECS/java-junit.spec:1.26  Mon Mar 30 07:33:20 2009
+++ SPECS/java-junit.spec       Wed Apr  1 19:50:25 2009
@@ -1,23 +1,36 @@
 # $Revision$, $Date$
+%bcond_without  javadoc         # don't build javadoc
+
+%if "%{pld_release}" == "ti"
+%bcond_without java_sun        # build with gcj
+%else
+%bcond_with    java_sun        # build with java-sun
+%endif
+
 %include       /usr/lib/rpm/macros.java
+
+%define                srcname         junit
 Summary:       JUnit - regression testing framework
 Summary(pl.UTF-8):     JUnit - środowisko do testów regresji
-Name:          junit
+Name:          java-junit
 Version:       4.4
 Release:       1
 License:       IBM Common Public License v1.0
 Group:         Libraries/Java
-Source0:       http://dl.sourceforge.net/junit/%{name}-%{version}-src.jar
+Source0:       http://dl.sourceforge.net/junit/%{srcname}-%{version}-src.jar
 # Source0-md5: 4126a0974473f7cb7df7fd5cd109505d
 URL:           http://www.junit.org/
 BuildRequires: hamcrest
-BuildRequires: jdk >= 1.5
+%{!?with_java_sun:BuildRequires:        java-gcj-compat-devel}
+%{?with_java_sun:BuildRequires: java-sun >= 1.5}
 BuildRequires: jpackage-utils
 BuildRequires: rpm-javaprov
 BuildRequires: rpmbuild(macros) >= 1.300
 BuildRequires: unzip
 Requires:      hamcrest
 Requires:      jdk >= 1.5
+Provides:      junit
+Obsoletes:     junit
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -33,6 +46,7 @@
 Group:         Documentation
 Requires:      jpackage-utils
 Obsoletes:     junit-doc
+Obsoletes:     junit-javadoc
 
 %description javadoc
 JUnit API documentation.
@@ -49,8 +63,8 @@
 export CLASSPATH=$(build-classpath hamcrest-core)
 
 %javac $(find -name '*.java')
-%jar -cvf %{name}-%{version}.jar $(find -type f '!' -name '*.java')
-%javadoc -d javadoc $(find -name '*.java')
+%jar -cvf %{srcname}-%{version}.jar $(find -type f '!' -name '*.java')
+%{?with_javadoc:%javadoc -d javadoc $(find -name '*.java')}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -59,19 +73,27 @@
 ln -sf junit-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/junit.jar
 
 # javadoc
-install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+%if %{with_javadoc}
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost 
symlink
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post javadoc
+ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
+
 %files
 %defattr(644,root,root,755)
 %{_javadir}/*.jar
 
+%if %{with_javadoc}
 %files javadoc
 %defattr(644,root,root,755)
-%{_javadocdir}/%{name}-%{version}
+%{_javadocdir}/%{srcname}-%{version}
+%endif
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -79,6 +101,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.27  2009/04/01 17:50:25  pawelz
+- added jdk bconds
+- changed Name to java-junit
+
 Revision 1.26  2009/03/30 05:33:20  pawelz
 - Libraries/Java
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/java-junit.spec?r1=1.26&r2=1.27&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to