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}
9 Group: Networking/Daemons
10 Source0: http://www.gknw.com/development/apache/httpd-2.0/unix/modules/mod_%{mod_name}-%{version}.tar.gz
11 # Source0-md5: 30c17d999edb5d83368369cde1c921bb
13 Source2: %{name}.logrotate
14 #URL: http://www.schroepl.net/projekte/mod_gzip/
15 BuildRequires: %{apxs}
16 BuildRequires: apache-devel >= 2.0.40
17 BuildRequires: rpmbuild(macros) >= 1.268
18 BuildRequires: zlib-devel
19 Requires: apache(modules-api) = %apache_modules_api
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
23 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
24 %define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs
27 Apache module: On-the-fly compression of HTML documents. Browser will
28 transparently decompress and display such documents.
31 Modu³ do apache: kompresuje dokumenty HTML w locie. Przegl±darki w
32 sposób przezroczysty dekompresuj± i wy¶wietlaj± takie dokumenty.
35 %setup -q -n mod_%{mod_name}
38 %{apxs} -Wc,-Wall,-pipe -c mod_%{mod_name}.c mod_%{mod_name}_debug.c mod_%{mod_name}_compress.c -o mod_%{mod_name}.so
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,/etc/logrotate.d,%{_pkglogdir}}
44 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
45 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
46 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
48 > $RPM_BUILD_ROOT%{_pkglogdir}/mod_gzip.log
51 rm -rf $RPM_BUILD_ROOT
54 %service -q httpd restart
57 if [ "$1" = "0" ]; then
58 %service -q httpd restart
62 %defattr(644,root,root,755)
64 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
65 %attr(755,root,root) %{_pkglibdir}/*.so
66 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
67 %attr(640,root,root) %ghost %{_pkglogdir}/*