template-specs: java.spec - source subpackage example
pawelz
pawelz at pld-linux.org
Thu Apr 15 01:11:34 CEST 2010
Author: pawelz Date: Wed Apr 14 23:11:34 2010 GMT
Module: template-specs Tag: HEAD
---- Log message:
- source subpackage example
---- Files affected:
template-specs:
java.spec (1.44 -> 1.45)
---- Diffs:
================================================================
Index: template-specs/java.spec
diff -u template-specs/java.spec:1.44 template-specs/java.spec:1.45
--- template-specs/java.spec:1.44 Sun Apr 4 14:53:09 2010
+++ template-specs/java.spec Thu Apr 15 01:11:27 2010
@@ -2,6 +2,7 @@
#
# Conditional build:
%bcond_without javadoc # don't build javadoc
+%bcond_without source # don't build source jar
%bcond_without tests # don't build and run tests
%if "%{pld_release}" == "ti"
@@ -39,6 +40,9 @@
BuildRequires: rpmbuild(macros) >= 1.300
# for %%undos macro
BuildRequires: rpmbuild(macros) >= 1.553
+%if %{with source}
+BuildRequires: rpmbuild(macros) >= 1.555
+%endif
BuildRequires: sed >= 4.0
# for %{_javadir}
Requires: jpackage-utils
@@ -102,6 +106,18 @@
%description manual
Manual for %{srcname}.
+%package source
+Summary: Source of %{srcname}
+Summary(pl.UTF-8): Źródła %{srcname}
+Group: Documentation
+Requires: jpackage-utils >= 1.555
+
+%description source
+Source of %{srcname}.
+
+%description source -l pl.UTF-8
+Źródła %{srcname}.
+
%prep
%setup -q -n %{srcname}-%{version}
#%%undos build.xml
@@ -122,6 +138,10 @@
cd src
%javac -cp $CLASSPATH $(find -name '*.java')
%jar cf ../%{srcname}.jar $(find -name '*.class')
+%if %{with source}
+%jar cf ../%{srcname}.src.jar $(find -name '*.java')
+%endif
+cd ..
%install
rm -rf $RPM_BUILD_ROOT
@@ -149,6 +169,10 @@
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+# 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
@@ -177,12 +201,21 @@
%ghost %{_javadocdir}/%{srcname}
%endif
+%if %{with source}
+%files source
+%defattr(644,root,root,755)
+%{_javasrcdir}/%{srcname}.src.jar
+%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.45 2010/04/14 23:11:27 pawelz
+- source subpackage example
+
Revision 1.44 2010/04/04 12:53:09 glen
- srcname mostly should be used
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/template-specs/java.spec?r1=1.44&r2=1.45&f=u
More information about the pld-cvs-commit
mailing list