- it is no longer part of Jakarta project
[packages/java-commons-daemon.git] / java-commons-daemon.spec
CommitLineData
45b31cda
ER
1# Conditional build:
2%bcond_without javadoc # don't build javadoc
3
9ff9c7e9 4%include /usr/lib/rpm/macros.java
d5a3b0e1 5Summary: Commons Daemon - controlling of Java daemons
6Summary(pl.UTF-8): Commons Daemon - kontrolowanie demonów w Javie
45b31cda 7Name: java-commons-daemon
d256e341 8Version: 1.0.1
3dabde62 9Release: 4
07460fff 10License: Apache v2.0
45b31cda 11Group: Libraries/Java
144a2761 12Source0: http://www.apache.org/dist/jakarta/commons/daemon/source/daemon-%{version}.tar.gz
d256e341 13# Source0-md5: df3eb5aafa53ca530843a09d40b8a1c0
45b31cda 14Patch0: jakarta-commons-daemon-link.patch
9ff9c7e9 15URL: http://commons.apache.org/daemon/
2c6feb05 16BuildRequires: ant >= 1.4.1
3ec3448b 17BuildRequires: automake
a1b45878 18BuildRequires: jdk >= 1.2
3ec3448b 19BuildRequires: jpackage-utils
a1b45878 20BuildRequires: junit >= 3.7
9ff9c7e9 21BuildRequires: rpm-javaprov
3ec3448b 22BuildRequires: rpmbuild(macros) >= 1.300
82e9a01d 23BuildRequires: xmlto >= 0:0.0.18-1
3f6ece99 24Requires: java-commons-collections >= 2.0
25Requires: java-commons-logging >= 1.0
45b31cda 26Requires: jpackage-utils
3ec3448b 27Requires: jre >= 1.2
45b31cda
ER
28Provides: jakarta-commons-daemon
29Obsoletes: jakarta-commons-daemon
4f6c9037
AM
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
4f6c9037 32%description
3ec3448b
ER
33The Daemon Component contains a set of Java and native code, including
34a set of Java interfaces applications must implement and Unix native
35code to control a Java daemon from a Unix operating system.
a1b45878 36
092243fe 37%description -l pl.UTF-8
3ec3448b
ER
38Komponent Daemon zawiera zbiór kodu w Javie i natywnego, zawierającego
39zbiór interfejsów w Javie, które muszą być zaimplementowane w
40aplikacjach oraz natywny kod uniksowy kontrolujący demony w Javie w
41systemie Unix.
4f6c9037 42
3ec3448b 43%package javadoc
d5a3b0e1 44Summary: Commons Daemon documentation
45Summary(pl.UTF-8): Dokumentacja do Commons Daemon
dac0d1c3 46Group: Documentation
9ff9c7e9 47Requires: jpackage-utils
3f6ece99 48Provides: jakarta-commons-daemon-javadoc
3ec3448b 49Obsoletes: jakarta-commons-daemon-doc
3f6ece99 50Obsoletes: jakarta-commons-daemon-javadoc
4f6c9037 51
3ec3448b 52%description javadoc
d5a3b0e1 53Commons Daemon documentation.
a1b45878 54
3ec3448b 55%description javadoc -l pl.UTF-8
d5a3b0e1 56Dokumentacja do Commons Daemon.
4f6c9037
AM
57
58%prep
45b31cda
ER
59%setup -qc
60mv daemon-%{version}/* .
99241a07 61%patch0 -p1
4f6c9037
AM
62
63%build
a1b45878 64# Java part
3ec3448b 65required_jars="junit"
9ff9c7e9 66export CLASSPATH=$(build-classpath $required_jars)
3ec3448b 67%ant dist
a1b45878
JB
68
69# native part
70cd src/native/unix
c8a0c252 71cp -f /usr/share/automake/config.sub support
a1b45878 72%configure \
9ff9c7e9 73 --with-java=%{java_home}
a1b45878 74%{__make}
82e9a01d 75refentry2man < man/jsvc.1.xml > man/jsvc.1
4f6c9037
AM
76
77%install
78rm -rf $RPM_BUILD_ROOT
3ec3448b 79install -d $RPM_BUILD_ROOT%{_javadir}
410c8def
ER
80
81# jars
82cp -a dist/commons-daemon.jar $RPM_BUILD_ROOT%{_javadir}/commons-daemon-%{version}.jar
83ln -s commons-daemon-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/commons-daemon.jar
4f6c9037 84
3ec3448b 85# javadoc
45b31cda 86%if %{with javadoc}
3ec3448b 87install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
9ff9c7e9
ER
88cp -a dist/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
89ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
45b31cda 90%endif
4f6c9037 91
82e9a01d 92install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
144a2761 93install src/native/unix/jsvc $RPM_BUILD_ROOT%{_bindir}
82e9a01d 94cp -a src/native/unix/man/jsvc.1 $RPM_BUILD_ROOT%{_mandir}/man1
a1b45878 95
4f6c9037
AM
96%clean
97rm -rf $RPM_BUILD_ROOT
98
3ec3448b 99%post javadoc
9ff9c7e9 100ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
3ec3448b 101
4f6c9037
AM
102%files
103%defattr(644,root,root,755)
104%doc dist/LICENSE
a1b45878 105%attr(755,root,root) %{_bindir}/jsvc
82e9a01d 106%{_mandir}/man1/jsvc.1*
c8a0c252 107%{_javadir}/*.jar
4f6c9037 108
45b31cda 109%if %{with javadoc}
3ec3448b 110%files javadoc
4f6c9037 111%defattr(644,root,root,755)
3ec3448b 112%{_javadocdir}/%{name}-%{version}
9ff9c7e9 113%ghost %{_javadocdir}/%{name}
45b31cda 114%endif
This page took 0.051499 seconds and 4 git commands to generate.