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