- unified %%build auto/th/java-commons-daemon-1_0_1-5
authorpawelz <pawelz@pld-linux.org>
Thu, 12 Feb 2009 16:39:52 +0000 (16:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- more %%docs
- install javadoc in correct dir
- build with java-gcj-compat-devel
- do not R jre
- rel 5

Changed files:
    java-commons-daemon.spec -> 1.26

java-commons-daemon.spec

index 8d23eb914d0c57dffefb6c8557e3686cdf1da410..bb8493ea38a40ae080b841b3f84e8a67c4c88dd1 100644 (file)
@@ -2,11 +2,13 @@
 %bcond_without javadoc         # don't build javadoc
 
 %include       /usr/lib/rpm/macros.java
+
+%define                srcname commons-daemon
 Summary:       Commons Daemon - controlling of Java daemons
 Summary(pl.UTF-8):     Commons Daemon - kontrolowanie demonów w Javie
 Name:          java-commons-daemon
 Version:       1.0.1
-Release:       4
+Release:       5
 License:       Apache v2.0
 Group:         Libraries/Java
 Source0:       http://www.apache.org/dist/commons/daemon/source/daemon-%{version}.tar.gz
@@ -15,7 +17,7 @@ Patch0:               jakarta-commons-daemon-link.patch
 URL:           http://commons.apache.org/daemon/
 BuildRequires: ant >= 1.4.1
 BuildRequires: automake
-BuildRequires: jdk >= 1.2
+BuildRequires: java-gcj-compat-devel
 BuildRequires: jpackage-utils
 BuildRequires: junit >= 3.7
 BuildRequires: rpm-javaprov
@@ -24,7 +26,6 @@ BuildRequires:        xmlto >= 0:0.0.18-1
 Requires:      java-commons-collections >= 2.0
 Requires:      java-commons-logging >= 1.0
 Requires:      jpackage-utils
-Requires:      jre >= 1.2
 Provides:      jakarta-commons-daemon
 Obsoletes:     jakarta-commons-daemon
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -63,8 +64,15 @@ mv daemon-%{version}/* .
 %build
 # Java part
 required_jars="junit"
-export CLASSPATH=$(build-classpath $required_jars)
-%ant dist
+CLASSPATH=$(build-classpath $required_jars)
+export CLASSPATH
+%ant -Dbuild.compiler=extJavac jar
+
+# javadoc
+%if %{with javadoc}
+export SHELL=/bin/sh
+%ant javadoc
+%endif
 
 # native part
 cd src/native/unix
@@ -79,14 +87,14 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_javadir}
 
 # jars
-cp -a dist/commons-daemon.jar $RPM_BUILD_ROOT%{_javadir}/commons-daemon-%{version}.jar
-ln -s commons-daemon-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/commons-daemon.jar
+cp -a dist/%{srcname}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}-%{version}.jar
+ln -s %{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}.jar
 
 # javadoc
 %if %{with javadoc}
-install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cp -a dist/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+cp -a dist/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
+ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
 %endif
 
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
@@ -97,11 +105,11 @@ cp -a src/native/unix/man/jsvc.1 $RPM_BUILD_ROOT%{_mandir}/man1
 rm -rf $RPM_BUILD_ROOT
 
 %post javadoc
-ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
+ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
 
 %files
 %defattr(644,root,root,755)
-%doc dist/LICENSE
+%doc PROPOSAL.html RELEASE-NOTES.txt STATUS.html
 %attr(755,root,root) %{_bindir}/jsvc
 %{_mandir}/man1/jsvc.1*
 %{_javadir}/*.jar
@@ -109,6 +117,6 @@ ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
 %if %{with javadoc}
 %files javadoc
 %defattr(644,root,root,755)
-%{_javadocdir}/%{name}-%{version}
-%ghost %{_javadocdir}/%{name}
+%{_javadocdir}/%{srcname}-%{version}
+%ghost %{_javadocdir}/%{srcname}
 %endif
This page took 0.070561 seconds and 4 git commands to generate.