- remove prebuilt binaries
[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
73c7da41 42%package -n jsvc
43Summary: Commons Daemon jsvc utility
44Summary(pl.UTF-8): Narzędzie jsvc Commons Daemon
45Group: Applications
46Requires: %{name} = %{version}-%{release}
47
48%description -n jsvc
49Jsvc is a set of libraries and applications for making Java
50applications run on UNIX more easily.
51
52%description -n jsvc -l pl.UTF-8
53Jsvc jest zestawem bibliotek i aplikacji które ułatwiają uruchamianie
54aplikacji Javy.
55
3ec3448b 56%package javadoc
d5a3b0e1 57Summary: Commons Daemon documentation
58Summary(pl.UTF-8): Dokumentacja do Commons Daemon
dac0d1c3 59Group: Documentation
9ff9c7e9 60Requires: jpackage-utils
3ec3448b 61Obsoletes: jakarta-commons-daemon-doc
3f6ece99 62Obsoletes: jakarta-commons-daemon-javadoc
4f6c9037 63
3ec3448b 64%description javadoc
d5a3b0e1 65Commons Daemon documentation.
a1b45878 66
3ec3448b 67%description javadoc -l pl.UTF-8
d5a3b0e1 68Dokumentacja do Commons Daemon.
4f6c9037
AM
69
70%prep
51f610d7 71%setup -q -n %{srcname}-%{version}-src
72
143196da 73find -name '*.o' -o -name '*.a' | xargs rm
74
99241a07 75%patch0 -p1
4f6c9037
AM
76
77%build
a1b45878 78# Java part
3ec3448b 79required_jars="junit"
0ff56f0d 80CLASSPATH=$(build-classpath $required_jars)
81export CLASSPATH
572f3ecb 82%ant jar %{?with_javadoc:javadoc}
a1b45878
JB
83
84# native part
85cd src/native/unix
c8a0c252 86cp -f /usr/share/automake/config.sub support
a1b45878 87%configure \
9ff9c7e9 88 --with-java=%{java_home}
a1b45878 89%{__make}
82e9a01d 90refentry2man < man/jsvc.1.xml > man/jsvc.1
4f6c9037
AM
91
92%install
93rm -rf $RPM_BUILD_ROOT
3ec3448b 94install -d $RPM_BUILD_ROOT%{_javadir}
410c8def
ER
95
96# jars
cda1e471 97cp -a dist/%{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}-%{version}.jar
0ff56f0d 98ln -s %{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}.jar
4f6c9037 99
3ec3448b 100# javadoc
45b31cda 101%if %{with javadoc}
0ff56f0d 102install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
103cp -a dist/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
104ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
45b31cda 105%endif
4f6c9037 106
82e9a01d 107install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
144a2761 108install src/native/unix/jsvc $RPM_BUILD_ROOT%{_bindir}
82e9a01d 109cp -a src/native/unix/man/jsvc.1 $RPM_BUILD_ROOT%{_mandir}/man1
a1b45878 110
4f6c9037
AM
111%clean
112rm -rf $RPM_BUILD_ROOT
113
3ec3448b 114%post javadoc
0ff56f0d 115ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
3ec3448b 116
4f6c9037
AM
117%files
118%defattr(644,root,root,755)
cda1e471 119%doc PROPOSAL.html RELEASE-NOTES.txt README
c8a0c252 120%{_javadir}/*.jar
4f6c9037 121
73c7da41 122%files -n jsvc
123%defattr(644,root,root,755)
124%attr(755,root,root) %{_bindir}/jsvc
125%{_mandir}/man1/jsvc.1*
126
45b31cda 127%if %{with javadoc}
3ec3448b 128%files javadoc
4f6c9037 129%defattr(644,root,root,755)
0ff56f0d 130%{_javadocdir}/%{srcname}-%{version}
131%ghost %{_javadocdir}/%{srcname}
45b31cda 132%endif
This page took 0.136502 seconds and 4 git commands to generate.