- spaces -> tabs
[packages/apache1-mod_jk.git] / apache1-mod_jk.spec
1 %define         apxs            /usr/sbin/apxs1
2 Summary:        Apache module that handles communication between Tomcat and Apache 1.3.x
3 Summary(pl):    Modu³ Apache'a obs³uguj±cy komunikacjê miêdzy Tomcatem a Apachem 1.3.x
4 %define         mod_name        jk
5 Name:           apache1-mod_%{mod_name}
6 Version:        1.2.5
7 Release:        0.1
8 License:        Apache
9 Group:          Networking/Daemons
10 Source0:        http://sunsite.icm.edu.pl/pub/www/apache/dist/jakarta/tomcat-connectors/jk/source/jakarta-tomcat-connectors-jk-%{version}-src.tar.gz
11 # Source0-md5:  55727c871286e010222bb0fb91f21d08
12 Source1:        %{name}.conf
13 Patch0:         jakarta-tomcat-connectors-jk-jkpass.patch
14 URL:            http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/doc/
15 BuildRequires:  %{apxs}
16 BuildRequires:  libtool
17 BuildRequires:  automake
18 BuildRequires:  autoconf
19 BuildRequires:  perl-base
20 PreReq:         apache(EAPI) < 2.0.0
21 PreReq:         apache(EAPI) >= 1.3.9
22 Requires(post,preun):   %{apxs}
23 Requires(post,preun):   %{__perl}
24 Requires(post,preun):   grep
25 Requires(preun):        fileutils
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Obsoletes:      jakarta-tomcat-connectors-jk
28
29 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
30 %define         _apacheconfdir  %(%{apxs} -q SYSCONFDIR)
31 %define         _apacheconf     %{_apacheconfdir}/apache.conf
32
33 %description
34 JK is a replacement to the elderly mod_jserv. It was a completely new
35 Tomcat-Apache plug-in that handles the communication between Tomcat
36 and Apache.
37
38 %description -l pl
39 JK jest zamiennikiem starego mod_jserv. Jest ca³kowicie now± wtyczk±
40 Tomcat-Apache obs³uguj±c± komunikacjê miêdzy Tomcatem a Apachem.
41
42 %prep
43 %setup -q -n jakarta-tomcat-connectors-jk-%{version}-src
44 %patch0 -p1
45
46 %build
47 cd jk/native
48
49 ./buildconf.sh
50
51 %configure \
52         --enable-EAPI \
53         --with-apxs=%{apxs}
54
55 %{__make}
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_apacheconf},/var/lock/mod_jk}
60
61 cd jk/native
62
63 %{__make} install \
64         DESTDIR=$RPM_BUILD_ROOT \
65         APXS="%{apxs} -S LIBEXECDIR=$RPM_BUILD_ROOT$(%{apxs} -q LIBEXECDIR)" \
66         libexecdir=$RPM_BUILD_ROOT%{_pkglibdir}
67
68 install %{SOURCE1} $RPM_BUILD_ROOT%{_apacheconfdir}/mod_jk.conf
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %post
74 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
75 if [ -f %{_apacheconf} ] && ! grep -q "^Include.*mod_jk.conf" %{_apacheconf}; then
76         echo "Include /etc/apache/mod_jk.conf" >> %{_apacheconf}
77 fi
78 if [ -f /var/lock/subsys/apache ]; then
79         /etc/rc.d/init.d/apache restart 1>&2
80 fi
81
82 %preun
83 if [ "$1" = "0" ]; then
84         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
85         umask 027
86         grep -v "^Include.*mod_jk.conf" %{_apacheconf} > \
87                 %{_apacheconf}.tmp
88         mv -f %{_apacheconf}.tmp %{_apacheconf}
89         if [ -f /var/lock/subsys/apache ]; then
90                 /etc/rc.d/init.d/apache restart 1>&2
91         fi
92 fi
93
94 %files
95 %defattr(644,root,root,755)
96 %doc jk/native/{README,CHANGES.txt} jk/docs/*
97 %config(noreplace) %{_apacheconfdir}/mod_jk.conf
98 %attr(755,root,root) %{_pkglibdir}/*
99 %attr(750,http,http) /var/lock/mod_jk
This page took 0.040058 seconds and 3 git commands to generate.