SPECS: java-xerces.spec - allow build with java_sun - javadoc bcond

pawelz pawelz at pld-linux.org
Mon Apr 13 16:17:56 CEST 2009


Author: pawelz                       Date: Mon Apr 13 14:17:56 2009 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- allow build with java_sun
- javadoc bcond

---- Files affected:
SPECS:
   java-xerces.spec (1.44 -> 1.45) 

---- Diffs:

================================================================
Index: SPECS/java-xerces.spec
diff -u SPECS/java-xerces.spec:1.44 SPECS/java-xerces.spec:1.45
--- SPECS/java-xerces.spec:1.44	Sat Feb 28 10:34:16 2009
+++ SPECS/java-xerces.spec	Mon Apr 13 16:17:51 2009
@@ -1,7 +1,14 @@
 # $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
+
 %define	srcname	xerces
-#
+
 %include	/usr/lib/rpm/macros.java
 Summary:	XML parser for Java
 Summary(pl.UTF-8):	Analizator składniowy XML-a napisany w Javie
@@ -11,7 +18,7 @@
 # appears that portions of the code are on other licenses.
 # can it all be called "Apache 2.0"?
 License:	Apache v2.0
-Group:		Applications/Publishing/XML/Java
+Group:		Libraries/Java
 Source0:	http://www.apache.org/dist/xml/xerces-j/Xerces-J-src.%{version}.tar.gz
 # Source0-md5:	bd43e57ec7105acc9f13072e0208d445
 # Get Xerces-J-tools to avoid BuildRequires: xerces-j
@@ -20,8 +27,10 @@
 Patch0:		xerces-j-target.patch
 URL:		http://xml.apache.org/xerces-j/
 BuildRequires:	ant >= 1.7.1-4
-BuildRequires:	java-gcj-compat-devel
+%{!?with_java_sun:BuildRequires:	java-gcj-compat-devel}
+%{?with_java_sun:BuildRequires:	java-sun}
 BuildRequires:	jpackage-utils
+BuildRequires:	rpm >= 4.4.9-56
 BuildRequires:	rpm-javaprov
 BuildRequires:	rpmbuild(macros) >= 1.300
 BuildRequires:	java-xml-commons
@@ -64,7 +73,7 @@
 CLASSPATH=$(build-classpath $required_jars):./tools/xercesImpl.jar:./tools/bin/xjavac.jar
 export CLASSPATH
 
-%ant -Dbuild.compiler=gcj jars javadocs
+%ant jars %{?with_javadoc:javadocs}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -75,10 +84,12 @@
 ln -sf xerces-j2-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/jaxp_parser_impl.jar
 ln -sf xerces-j2-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/xercesImpl.jar
 
+%if %{with javadoc}
 # javadoc
 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
 cp -a build/docs/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
 ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -91,10 +102,12 @@
 %doc LICENSE* NOTICE* README Readme.html
 %{_javadir}/*.jar
 
+%if %{with javadoc}
 %files javadoc
 %defattr(644,root,root,755)
 %{_javadocdir}/%{srcname}-%{version}
 %ghost %{_javadocdir}/%{srcname}
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -102,6 +115,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.45  2009/04/13 14:17:51  pawelz
+- allow build with java_sun
+- javadoc bcond
+
 Revision 1.44  2009/02/28 09:34:16  pawelz
 - rel 5 (rebuild with working gjdoc)
 
================================================================

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



More information about the pld-cvs-commit mailing list