packages: java-joda-time/java-joda-time.spec - source subpackage
pawelz
pawelz at pld-linux.org
Thu Apr 15 01:32:33 CEST 2010
Author: pawelz Date: Wed Apr 14 23:32:33 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- source subpackage
---- Files affected:
packages/java-joda-time:
java-joda-time.spec (1.2 -> 1.3)
---- Diffs:
================================================================
Index: packages/java-joda-time/java-joda-time.spec
diff -u packages/java-joda-time/java-joda-time.spec:1.2 packages/java-joda-time/java-joda-time.spec:1.3
--- packages/java-joda-time/java-joda-time.spec:1.2 Sat Apr 3 02:20:09 2010
+++ packages/java-joda-time/java-joda-time.spec Thu Apr 15 01:32:28 2010
@@ -4,6 +4,7 @@
#
# Conditional build:
%bcond_without javadoc # don't build javadoc
+%bcond_without source # don't build source jar
%if "%{pld_release}" == "ti"
%bcond_without java_sun # build with gcj
@@ -28,10 +29,10 @@
%{?with_java_sun:BuildRequires: java-sun}
# NOT only for tests. If not present ant will try to download it.
BuildRequires: java-junit
-BuildRequires: jpackage-utils
+BuildRequires: jpackage-utils >= 1.7.5-2
BuildRequires: rpm >= 4.4.9-56
BuildRequires: rpm-javaprov
-BuildRequires: rpmbuild(macros) >= 1.300
+BuildRequires: rpmbuild(macros) >= 1.555
# for %{_javadir}
Requires: jpackage-utils
BuildArch: noarch
@@ -58,6 +59,18 @@
%description javadoc -l fr.UTF-8
Javadoc pour %{name}.
+%package source
+Summary: Source files for %{srcname}
+Summary(pl.UTF-8): Źródła %{srcname}
+Group: Documentation
+Requires: jpackage-utils
+
+%description source
+Source files for %{srcname}.
+
+%description source -l pl.UTF-8
+Źródła %{srcname}.
+
%prep
%setup -q -n %{srcname}-%{version}-src
@@ -69,6 +82,12 @@
%ant -Djunit.jar=$JUNIT_JAR
%{?with_javadoc:%ant -Djunit.jar=$JUNIT_JAR javadoc}
+# source jar
+%if %{with source}
+cd src
+%jar cf ../%{srcname}.src.jar $(find -name '*.java')
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_javadir}
@@ -84,6 +103,12 @@
ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
%endif
+# source jar
+install -d $RPM_BUILD_ROOT%{_javasrcdir}
+%if %{with source}
+cp %{srcname}.src.jar $RPM_BUILD_ROOT%{_javasrcdir}/%{srcname}.src.jar
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -101,12 +126,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.3 2010/04/14 23:32:28 pawelz
+- source subpackage
+
Revision 1.2 2010/04/03 00:20:09 pawelz
- rel 1. It builds EVEN on gcj.
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/java-joda-time/java-joda-time.spec?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list