]> git.pld-linux.org Git - packages/apache-mod_gzip.git/blob - apache-mod_gzip.spec
- added security patch (CAN-2003-0842, CAN-2003-0843, CAN-2003-0844)
[packages/apache-mod_gzip.git] / apache-mod_gzip.spec
1 %define         mod_name        gzip
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: On-the-fly compression of HTML documents
4 Summary(pl):    Modu³ do apache: kompresuje dokumenty HTML w locie
5 Name:           apache-mod_%{mod_name}
6 Version:        1.3.26.1a
7 Release:        2
8 License:        Apache
9 Group:          Networking/Daemons
10 Source0:        http://dl.sourceforge.net/mod-gzip/mod_gzip-%{version}.tgz
11 # Source0-md5:  080ccc5d789ed5efa0c0a7625e4fa02d
12 Source1:        mod_%{mod_name}.logrotate
13 Patch0:         mod_%{mod_name}-name_clash.patch
14 Patch1:         mod_%{mod_name}-security.patch
15 URL:            http://sourceforge.net/projects/mod-gzip/
16 BuildRequires:  %{apxs}
17 BuildRequires:  apache(EAPI)-devel
18 BuildRequires:  zlib-devel
19 Requires(post,preun):   %{apxs}
20 Requires(post,preun):   grep
21 Requires(preun):        fileutils
22 Requires:       apache(EAPI)
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
26 %define         _sysconfdir     /etc/httpd
27
28 %description
29 Apache module: On-the-fly compression of HTML documents. Browser will
30 transparently decompress and display such documents.
31
32 %description -l pl
33 Modu³ do apache: kompresuje dokumenty HTML w locie. Przegl±darki w
34 sposób przezroczysty dekompresuj± i wy¶wietlaj± takie dokumenty.
35
36 %prep
37 %setup -q -n mod_%{mod_name}-%{version}
38 %patch0 -p1
39 %patch1 -p1
40
41 %build
42 %{apxs} -Wc,-Wall,-pipe -c mod_%{mod_name}.c mod_%{mod_name}_debug.c mod_%{mod_name}_compress.c -o mod_%{mod_name}.so
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},/etc/logrotate.d}
47
48 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
49 sed -e 's#logs/mod_gzip.log#/var/log/httpd/mod_gzip.log#g' docs/mod_gzip.conf.sample > $RPM_BUILD_ROOT%{_sysconfdir}/mod_gzip.conf
50
51 install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
57 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
58 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_%{mod_name}.conf" /etc/httpd/httpd.conf; then
59         echo "Include /etc/httpd/mod_%{mod_name}.conf" >> /etc/httpd/httpd.conf
60 fi
61 if [ -f /var/lock/subsys/httpd ]; then
62         /etc/rc.d/init.d/httpd restart 1>&2
63 fi
64
65 %preun
66 if [ "$1" = "0" ]; then
67         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
68         umask 027
69         grep -v "^Include.*mod_%{mod_name}.conf" /etc/httpd/httpd.conf > \
70                 /etc/httpd/httpd.conf.tmp
71         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
72         if [ -f /var/lock/subsys/httpd ]; then
73                 /etc/rc.d/init.d/httpd restart 1>&2
74         fi
75 fi
76
77 %files
78 %defattr(644,root,root,755)
79 %doc docs/manual/english/*
80 %lang(de) %doc docs/manual/deutsch
81 %attr(755,root,root) %{_pkglibdir}/*
82 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_gzip.conf
83 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/*
This page took 0.085871 seconds and 3 git commands to generate.