]>
Commit | Line | Data |
---|---|---|
7dec7f39 PG |
1 | %define mod_name gzip |
2 | %define apxs /usr/sbin/apxs | |
3 | Summary: Apache module: On-the-fly compression of HTML documents | |
e58eb5a2 | 4 | Summary(pl.UTF-8): Moduł do apache: kompresuje dokumenty HTML w locie |
7dec7f39 | 5 | Name: apache-mod_%{mod_name} |
4f43cf11 | 6 | Version: 2.1.0 |
7dec7f39 PG |
7 | Release: 0.1 |
8 | License: Apache | |
17f06578 | 9 | Group: Networking/Daemons/HTTP |
cd589e65 | 10 | Source0: http://www.gknw.net/development/apache/httpd-2.0/unix/modules/mod_%{mod_name}-%{version}.tar.gz |
4f43cf11 | 11 | # Source0-md5: 9011aa2dc4701c0301e6c608269f8835 |
7dec7f39 PG |
12 | Source1: %{name}.conf |
13 | Source2: %{name}.logrotate | |
cd589e65 | 14 | URL: http://www.gknw.net/development/apache/ |
d9ac8fcf | 15 | BuildRequires: %{apxs} |
7dec7f39 | 16 | BuildRequires: apache-devel >= 2.0.40 |
afcc8317 | 17 | BuildRequires: rpmbuild(macros) >= 1.268 |
7dec7f39 | 18 | BuildRequires: zlib-devel |
5d8b93c0 | 19 | Requires: apache(modules-api) = %apache_modules_api |
7dec7f39 PG |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
22 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
23 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
7dec7f39 PG |
24 | |
25 | %description | |
26 | Apache module: On-the-fly compression of HTML documents. Browser will | |
27 | transparently decompress and display such documents. | |
28 | ||
4326f310 JR |
29 | %description -l pl.UTF-8 |
30 | Moduł do apache: kompresuje dokumenty HTML w locie. Przeglądarki w | |
31 | sposób przezroczysty dekompresują i wyświetlają takie dokumenty. | |
7dec7f39 PG |
32 | |
33 | %prep | |
4f43cf11 | 34 | %setup -q -n mod_%{mod_name}-%{version} |
7dec7f39 PG |
35 | |
36 | %build | |
4f43cf11 | 37 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la |
7dec7f39 PG |
38 | |
39 | %install | |
40 | rm -rf $RPM_BUILD_ROOT | |
4f43cf11 | 41 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf,/etc/logrotate.d,/var/log/httpd} |
7dec7f39 | 42 | |
5d8b93c0 | 43 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf |
7dec7f39 PG |
44 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} |
45 | ||
4f43cf11 | 46 | touch $RPM_BUILD_ROOT/var/log/httpd/mod_gzip_log |
47 | ||
48 | install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
7dec7f39 PG |
49 | |
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %post | |
afcc8317 | 54 | %service -q httpd restart |
4f43cf11 | 55 | touch /var/log/httpd/mod_gzip_log && chown root:http /var/log/httpd/mod_gzip_log && chmod 620 /var/log/httpd/mod_gzip_log |
7dec7f39 PG |
56 | |
57 | %postun | |
58 | if [ "$1" = "0" ]; then | |
afcc8317 | 59 | %service -q httpd restart |
7dec7f39 PG |
60 | fi |
61 | ||
62 | %files | |
63 | %defattr(644,root,root,755) | |
64 | %doc *.txt logos/* | |
5d8b93c0 ER |
65 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf |
66 | %attr(755,root,root) %{_pkglibdir}/*.so | |
7dec7f39 | 67 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/* |
4f43cf11 | 68 | # append by webserver |
69 | %attr(620,root,http) %ghost /var/log/httpd/mod_gzip_log |