packages: java-hamcrest/java-hamcrest.spec, java-hamcrest/javadoc-build.pat...

pawelz pawelz at pld-linux.org
Tue Apr 20 11:23:47 CEST 2010


Author: pawelz                       Date: Tue Apr 20 09:23:47 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix build javadoc and enable it by default
- build src jar and package it as -source subpackage

---- Files affected:
packages/java-hamcrest:
   java-hamcrest.spec (1.16 -> 1.17) , javadoc-build.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/java-hamcrest/java-hamcrest.spec
diff -u packages/java-hamcrest/java-hamcrest.spec:1.16 packages/java-hamcrest/java-hamcrest.spec:1.17
--- packages/java-hamcrest/java-hamcrest.spec:1.16	Mon Apr 19 22:10:40 2010
+++ packages/java-hamcrest/java-hamcrest.spec	Tue Apr 20 11:23:42 2010
@@ -5,7 +5,7 @@
 # - does not build with gcj.
 #
 # Conditional build:
-%bcond_with	javadoc		# build javadoc
+%bcond_without	javadoc		# build javadoc
 %bcond_with	tests		# build and run tests (tests are broken)
 %bcond_with binary		# do not compile .jars from source use bundled ones
 %bcond_with	bootstrap	# break BR loop (java-junit, java-qdox)
@@ -29,6 +29,7 @@
 Source0:	http://hamcrest.googlecode.com/files/%{srcname}-%{version}.tgz
 # Source0-md5:	b4bd43f44d082d77daf7ec564d304cdf
 Patch0:		%{srcname}-nosrc.patch
+Patch1:		javadoc-build.patch
 URL:		http://code.google.com/p/hamcrest/
 %if %{without binary}
 BuildRequires:	ant >= 1.6
@@ -65,9 +66,22 @@
 %description javadoc -l pl.UTF-8
 Dokumentacja javadoc do hamcresta.
 
+%package source
+Summary:	Source code of %{srcname}
+Summary(pl.UTF-8):	Kod źródłowy %{srcname}
+Group:		Documentation
+Requires:	jpackage-utils >= 1.555
+
+%description source
+Source code of %{srcname}.
+
+%description source -l pl.UTF-8
+Kod źródłowy %{srcname}.
+
 %prep
 %setup -q -n %{srcname}-%{version}
 %patch0 -p0
+%patch1 -p0
 
 rm -vf lib/integration/junit-*.jar
 rm -vf lib/generator/qdox-*.jar
@@ -111,6 +125,13 @@
 	-Dversion=%{version}
 %endif
 
+# source
+%jar cf %{srcname}.src.jar -C build/temp/hamcrest-library/generated-code .
+%jar uf %{srcname}.src.jar -C build/temp/hamcrest-core/generated-code .
+for I in examples integration library generator core; do
+	%jar uf %{srcname}.src.jar -C hamcrest-$I/src/main/java .
+done
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_javadir}
@@ -123,10 +144,14 @@
 %if %{with javadoc}
 # javadoc
 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
-cp -a dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+cp -a build/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
 ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
 %endif
 
+#source
+install -d $RPM_BUILD_ROOT%{_javasrcdir}
+cp -a %{srcname}.src.jar $RPM_BUILD_ROOT%{_javasrcdir}/%{srcname}.src.jar
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -145,12 +170,20 @@
 %ghost %{_javadocdir}/%{srcname}
 %endif
 
+%files source
+%defattr(644,root,root,755)
+%{_javasrcdir}/%{srcname}.src.jar
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.17  2010/04/20 09:23:42  pawelz
+- fix build javadoc and enable it by default
+- build src jar and package it as -source subpackage
+
 Revision 1.16  2010/04/19 20:10:40  pawelz
 - up to 1.2
 - use our new cool %bootstrap_release macro

================================================================
Index: packages/java-hamcrest/javadoc-build.patch
diff -u /dev/null packages/java-hamcrest/javadoc-build.patch:1.1
--- /dev/null	Tue Apr 20 11:23:47 2010
+++ packages/java-hamcrest/javadoc-build.patch	Tue Apr 20 11:23:42 2010
@@ -0,0 +1,22 @@
+--- build.xml.orig	2010-04-20 11:10:14.000000000 +0200
++++ build.xml	2010-04-20 11:15:13.000000000 +0200
+@@ -196,8 +196,7 @@
+ 
+ 	<target name="javadoc" depends="library">
+ 		<mkdir dir="build/javadoc"/>
+-		<javadoc destdir="build/javadoc" source="1.5" failonerror="yes"
+-			overview="overview.html">
++		<javadoc destdir="build/javadoc" source="1.5" failonerror="yes">
+ 			
+             <classpath>
+                 <fileset dir="lib/integration">
+@@ -208,7 +207,8 @@
+ 			<packageset dir="hamcrest-core/src/main/java"/>
+ 			<packageset dir="hamcrest-library/src/main/java" excludes="org/hamcrest/internal"/>
+ 			<packageset dir="hamcrest-integration/src/main/java"/>
+-			<packageset dir="build/generated-code"/>
++			<packageset dir="build/temp/hamcrest-library/generated-code"/>
++			<packageset dir="build/temp/hamcrest-core/generated-code"/>
+ 			
+ 			<group title="Hamcrest API and Utility Classes" packages="org.hamcrest"/>
+ 			<group title="Matcher Library" packages="org.hamcrest.*"/>
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/java-hamcrest/java-hamcrest.spec?r1=1.16&r2=1.17&f=u



More information about the pld-cvs-commit mailing list