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