]> git.pld-linux.org Git - packages/apache-mod_jk.git/blob - apache-mod_jk.spec
1e0171420f2216ef4d0d5a68cc34e73f51eae8e2
[packages/apache-mod_jk.git] / apache-mod_jk.spec
1 # TODO:
2 # - logrotate file
3 %define         mod_name        jk
4 %define         apxs            /usr/sbin/apxs
5 Summary:        Apache module that handles communication between Tomcat and Apache
6 Summary(pl.UTF-8):      Moduł Apache'a obsługujący komunikację między Tomcatem a Apachem
7 Name:           apache-mod_%{mod_name}
8 Version:        1.2.20
9 Release:        0.1
10 License:        Apache License 2.0
11 Group:          Networking/Daemons
12 Source0:        http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-%{version}/tomcat-connectors-%{version}-src.tar.gz
13 # Source0-md5:  f10709339009b3be9398d3a838d9cabd
14 Source1:        %{name}.conf
15 Patch0:         %{name}-libtool.patch
16 Patch1:         %{name}-apxs.patch
17 URL:            http://tomcat.apache.org/connectors-doc/
18 BuildRequires:  %{apxs}
19 BuildRequires:  apache-devel >= 2.2.0-6.8
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 BuildRequires:  libtool
23 BuildRequires:  perl-base
24 BuildRequires:  rpmbuild(macros) >= 1.268
25 Requires:       apache(modules-api) = %{apache_modules_api}
26 Obsoletes:      jakarta-tomcat-connectors-jk
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
30 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
31
32 %description
33 JK is a replacement to the elderly mod_jserv. It was a completely new
34 Tomcat-Apache plug-in that handles the communication between Tomcat
35 and Apache.
36
37 %description -l pl.UTF-8
38 JK jest zamiennikiem starego mod_jserv. Jest całkowicie nową wtyczką
39 Tomcat-Apache obsługującą komunikację między Tomcatem a Apachem.
40
41 %prep
42 %setup -q -n tomcat-connectors-%{version}-src
43 #%patch0 -p1
44 %patch1 -p1
45
46 %build
47 cd native
48 %{__libtoolize}
49 %{__aclocal}
50 %{__autoheader}
51 %{__automake}
52 %{__autoconf}
53 %configure \
54         --with-apxs=%{apxs} \
55         --with-java-home="${JAVA_HOME:-%{_libdir}/java}"
56 %{__make}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,/var/{lock/mod_jk,log/httpd}}
61
62 %{__make} -C native install \
63         DESTDIR=$RPM_BUILD_ROOT
64
65 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/80_mod_jk.conf
66 touch $RPM_BUILD_ROOT/var/log/httpd/mod_jk.log
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %post
72 if [ ! -f /var/log/httpd/mod_jk.log ]; then
73         umask 027
74         touch /var/log/httpd/mod_jk.log
75         chown root:logs /var/log/httpd/mod_jk.log
76 fi
77 %service -q httpd restart
78
79 %postun
80 if [ "$1" = "0" ]; then
81         %service -q httpd restart
82 fi
83
84 %files
85 %defattr(644,root,root,755)
86 %doc native/{README,CHANGES,NEWS}
87 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
88 %attr(755,root,root) %{_pkglibdir}/*.so
89 %attr(770,root,http) /var/lock/mod_jk
90 %attr(640,root,logs) %ghost /var/log/httpd/mod_jk.log
This page took 0.155924 seconds and 2 git commands to generate.