]> git.pld-linux.org Git - packages/apache-mod_jk.git/blob - apache-mod_jk.spec
- default log and more TODO
[packages/apache-mod_jk.git] / apache-mod_jk.spec
1 # TODO:
2 # - fix looking for /usr/lib/apache/lib/apache/build/config_vars.mk....
3 # - logrotate file
4 # /TODO
5 %define         mod_name        jk
6 %define         apxs            /usr/sbin/apxs
7 Summary:        Apache module that handles communication between Tomcat and Apache
8 Summary(pl):    Modu³ Apache'a obs³uguj±cy komunikacjê miêdzy Tomcatem a Apachem
9 Name:           apache-mod_%{mod_name}
10 Version:        1.2.8
11 Release:        0.9
12 License:        Apache
13 Group:          Networking/Daemons
14 Source0:        http://www.apache.org/dist/jakarta/tomcat-connectors/jk/source/jk-%{version}/jakarta-tomcat-connectors-%{version}-src.tar.gz
15 # Source0-md5:  eb579c47f8dd71e526d7561c919ce06d
16 Source1:        %{name}.conf
17 URL:            http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/doc/
18 BuildRequires:  %{apxs}
19 BuildRequires:  apache-devel >= 2.0.40
20 BuildRequires:  apr-devel
21 BuildRequires:  apr-util-devel
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 BuildRequires:  libtool
25 BuildRequires:  perl-base
26 BuildRequires:  rpmbuild(macros) >= 1.120
27 PreReq:         apache >= 2.0.40
28 Requires:       apache(modules-api) = %{apache_modules_api}
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Obsoletes:      jakarta-tomcat-connectors-jk
31
32 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
33 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR)
34
35 %description
36 JK is a replacement to the elderly mod_jserv. It was a completely new
37 Tomcat-Apache plug-in that handles the communication between Tomcat
38 and Apache.
39
40 %description -l pl
41 JK jest zamiennikiem starego mod_jserv. Jest ca³kowicie now± wtyczk±
42 Tomcat-Apache obs³uguj±c± komunikacjê miêdzy Tomcatem a Apachem.
43
44 %prep
45 %setup -q -n jakarta-tomcat-connectors-%{version}-src
46
47 %build
48 cd jk/native
49
50 if [ -z "$JAVA_HOME" ]; then
51         JAVA_HOME=%{_libdir}/java
52 fi
53 export JAVA_HOME
54 ./buildconf.sh
55
56 %configure \
57         --enable-EAPI \
58         --with-apxs=%{apxs} \
59         --with-java-home=${JAVA_HOME}
60
61 %{__make} \
62         EXTRA_CFLAGS="`apr-1-config --includes` `apu-1-config --includes`"
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,/var/{lock/mod_jk,log/httpd}}
67
68 cd jk/native
69
70 %{__make} install \
71         DESTDIR=$RPM_BUILD_ROOT \
72         APXS="%{apxs} -S LIBEXECDIR=$RPM_BUILD_ROOT%{_pkglibdir}" \
73         libexecdir=$RPM_BUILD_ROOT%{_pkglibdir}
74
75 echo "LoadModule jk_module      %{_pkglibdir}/mod_jk.so" > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/80_mod_jk.conf
76 cat %{SOURCE1} >> $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/80_mod_jk.conf
77
78 touch $RPM_BUILD_ROOT/var/log/httpd/mod_jk.log
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %post
84 if [ -f /var/lock/subsys/httpd ]; then
85         /etc/rc.d/init.d/httpd restart 1>&2
86 fi
87 touch /var/log/httpd/mod_jk.log
88
89 %preun
90 if [ "$1" = "0" ]; then
91         if [ -f /var/lock/subsys/httpd ]; then
92                 /etc/rc.d/init.d/httpd restart 1>&2
93         fi
94 fi
95
96 %files
97 %defattr(644,root,root,755)
98 %doc jk/native/{README,CHANGES.txt}
99 %config(noreplace) %{_sysconfdir}/httpd.conf/80_mod_jk.conf
100 %attr(755,root,root) %{_pkglibdir}/*
101 %attr(750,http,http) /var/lock/mod_jk
102 %attr(640,root,logs) %ghost %config(noreplace) /var/log/httpd/mod_jk.log
This page took 0.078137 seconds and 3 git commands to generate.