SPECS: template-java.spec - more stuff to copy paste

glen glen at pld-linux.org
Wed Nov 21 23:15:56 CET 2007


Author: glen                         Date: Wed Nov 21 22:15:56 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- more stuff to copy paste

---- Files affected:
SPECS:
   template-java.spec (1.21 -> 1.22) 

---- Diffs:

================================================================
Index: SPECS/template-java.spec
diff -u SPECS/template-java.spec:1.21 SPECS/template-java.spec:1.22
--- SPECS/template-java.spec:1.21	Tue Oct  9 19:18:26 2007
+++ SPECS/template-java.spec	Wed Nov 21 23:15:51 2007
@@ -1,4 +1,9 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	javadoc		# don't build javadoc
+%bcond_without	tests		# don't build and run tests
+#
 %include	/usr/lib/rpm/macros.java
 Summary:	-
 Name:		-
@@ -9,6 +14,9 @@
 Source0:	-
 # Source0-md5:	-
 URL:		-
+%if %(locale -a | grep -q '^en_US$'; echo $?)
+BuildRequires:	glibc-localedb-all
+%endif
 BuildRequires:	jpackage-utils
 BuildRequires:	rpm-javaprov
 BuildRequires:	rpmbuild(macros) >= 1.300
@@ -50,6 +58,9 @@
 %description javadoc -l pl.UTF-8
 Dokumentacja do %{name} -
 
+%description javadoc -l fr
+Javadoc pour %{name}.
+
 %prep
 %setup -q
 
@@ -59,6 +70,8 @@
 required_jars="jaxp_parser_impl"
 export CLASSPATH=$(build-classpath $required_jars)
 
+export LC_ALL=en_US # source code not US-ASCII
+
 %ant
 %{__make}
 
@@ -77,9 +90,11 @@
 done
 
 # javadoc
+%if %{with javadoc}
 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
 cp -a dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
+%endif
 
 # source code
 install -d $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{version}
@@ -100,14 +115,18 @@
 %defattr(644,root,root,755)
 %doc docs/*
 
-#%%files demo
-#%defattr(644,root,root,755)
-#%{_examplesdir}/%{name}-%{version}
+%if 0
+%files demo
+%defattr(644,root,root,755)
+%{_examplesdir}/%{name}-%{version}
+%endif
 
+%if %{with javadoc}
 %files javadoc
 %defattr(644,root,root,755)
 %{_javadocdir}/%{name}-%{version}
 %ghost %{_javadocdir}/%{name}
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -115,6 +134,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.22  2007-11-21 22:15:51  glen
+- more stuff to copy paste
+
 Revision 1.21  2007-10-09 17:18:26  glen
 - comment out %files demo (no %package)
 
================================================================

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



More information about the pld-cvs-commit mailing list