SPECS: java-commons-lang.spec - split javadoc into subpackage - do not R jr...

pawelz pawelz at pld-linux.org
Tue Feb 10 14:27:30 CET 2009


Author: pawelz                       Date: Tue Feb 10 13:27:30 2009 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- split javadoc into subpackage
- do not R jre
- use java-gcj-compat-devel
- rel 3

---- Files affected:
SPECS:
   java-commons-lang.spec (1.13 -> 1.14) 

---- Diffs:

================================================================
Index: SPECS/java-commons-lang.spec
diff -u SPECS/java-commons-lang.spec:1.13 SPECS/java-commons-lang.spec:1.14
--- SPECS/java-commons-lang.spec:1.13	Mon Feb  2 13:28:35 2009
+++ SPECS/java-commons-lang.spec	Tue Feb 10 14:27:25 2009
@@ -1,19 +1,22 @@
 # $Revision$, $Date$
+%bcond_without	javadoc		# build apidocs
+#
+%define		srcname	commons-lang
 Summary:	Commons Lang - utility functions and components
 Summary(pl.UTF-8):	Commons Lang - funkcje i komponenty narzędziowe
 Name:		java-commons-lang
 Version:	2.1
-Release:	2
+Release:	3
 License:	Apache v1.1
 Group:		Libraries/Java
 Source0:	http://www.apache.org/dist/commons/lang/source/commons-lang-%{version}-src.tar.gz
 # Source0-md5:	d8379e93f597b2ae6d1f7b4bb7e83fce
 URL:		http://commons.apache.org/lang/
 BuildRequires:	ant >= 1.5
+BuildRequires:	java-gcj-compat-devel
 BuildRequires:	jaxp_parser_impl
 BuildRequires:	jpackage-utils
 BuildRequires:	rpmbuild(macros) >= 1.294
-Requires:	jre
 Obsoletes:	jakarta-commons-lang
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -26,33 +29,76 @@
 Commons Lang to zestaw funkcji narzędziowych i komponentów
 wielokrotnego użycia, które mogą być pomocne w każdym środowisku Javy.
 
+%package javadoc
+Summary:	Online manual for Commons Lang
+Summary(pl.UTF-8):	Dokumentacja online do Commons Lang
+Group:		Documentation
+Requires:	jpackage-utils
+
+%description javadoc
+Documentation for Commons Lang.
+
+%description javadoc -l pl.UTF-8
+Dokumentacja do Commons Lang.
+
+%description javadoc -l fr.UTF-8
+Javadoc pour Commons Lang.
+
 %prep
 %setup -q -n commons-lang-%{version}
 
 %build
-%ant dist
+%ant -Dbuild.compiler=extJavac jar
+
+%if %{with javadoc}
+export SHELL=/bin/sh
+%ant javadoc
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_javadir}
 
 install dist/*.jar $RPM_BUILD_ROOT%{_javadir}
-ln -sf commons-lang-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/commons-lang.jar
+ln -sf %{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}.jar
+
+# javadoc
+%if %{with javadoc}
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+cp -a dist/docs/api/* $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)
-%doc LICENSE.txt PROPOSAL.html RELEASE-NOTES.txt STATUS.html dist/docs/api
+%doc LICENSE.txt PROPOSAL.html RELEASE-NOTES.txt STATUS.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
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.14  2009/02/10 13:27:25  pawelz
+- split javadoc into subpackage
+- do not R jre
+- use java-gcj-compat-devel
+- rel 3
+
 Revision 1.13  2009/02/02 12:28:35  glen
 - Libraries/Java group
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/java-commons-lang.spec?r1=1.13&r2=1.14&f=u



More information about the pld-cvs-commit mailing list