]>
Commit | Line | Data |
---|---|---|
609e82f3 | 1 | %define mod_name gunzip |
fabce7cb | 2 | %define apxs /usr/sbin/apxs1 |
609e82f3 | 3 | Summary: Apache module: On-the-fly decompression of HTML documents |
0a766a04 ER |
4 | Summary(es.UTF-8): Descompresión instantanea de archivos HTML para Apache |
5 | Summary(pl.UTF-8): Moduł do apache: dekompresuje dokumenty HTML w locie | |
6 | Summary(pt_BR.UTF-8): Descompressão "On-the-fly" de arquivos HTML para o Apache | |
fabce7cb | 7 | Name: apache1-mod_%{mod_name} |
609e82f3 | 8 | Version: 1 |
bb8e6e79 | 9 | Release: 3 |
48831238 | 10 | License: GPL v2 |
609e82f3 | 11 | Group: Networking/Daemons |
609e82f3 | 12 | Source0: http://sep.hamburg.com/mod_%{mod_name}.tar.gz |
7f4fd979 | 13 | # Source0-md5: 9f549047abccccf6570333bb0313d2cd |
92689297 | 14 | BuildRequires: apache1-apxs |
d6f114b9 | 15 | BuildRequires: apache1-devel >= 1.3.33-2 |
cbcf0427 | 16 | BuildRequires: rpmbuild(macros) >= 1.268 |
609e82f3 | 17 | BuildRequires: zlib-devel |
d6f114b9 | 18 | Requires(triggerpostun): %{apxs} |
bb8e6e79 | 19 | Requires: apache1(EAPI) |
5c0ead11 | 20 | Obsoletes: apache-mod_gunzip <= 1 |
0ec1feb4 | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
609e82f3 | 22 | |
d6f114b9 ER |
23 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
24 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
609e82f3 AF |
25 | |
26 | %description | |
27 | Apache module: On-the-fly decompression of HTML documents. | |
28 | ||
f8970391 JR |
29 | %description -l es.UTF-8 |
30 | Descompresión instantanea de archivos HTML para Apache. | |
589f7611 | 31 | |
f8970391 JR |
32 | %description -l pl.UTF-8 |
33 | Moduł do apache: dekompresuje dokumenty HTML w locie. | |
609e82f3 | 34 | |
f8970391 JR |
35 | %description -l pt_BR.UTF-8 |
36 | Descompressão "On-the-fly" de arquivos HTML para o Apache. | |
589f7611 | 37 | |
70705ab6 | 38 | %prep |
609e82f3 AF |
39 | %setup -q -n mod_%{mod_name} |
40 | ||
41 | %build | |
15c6ad09 | 42 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz |
609e82f3 AF |
43 | |
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
d6f114b9 | 46 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
609e82f3 | 47 | |
baebc5df | 48 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} |
609e82f3 | 49 | |
d6f114b9 ER |
50 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
51 | $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf | |
52 | ||
d1c356b5 JB |
53 | %clean |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
609e82f3 | 56 | %post |
cbcf0427 | 57 | %service -q apache restart |
609e82f3 | 58 | |
062fd3a2 | 59 | %postun |
609e82f3 | 60 | if [ "$1" = "0" ]; then |
cbcf0427 | 61 | %service -q apache restart |
609e82f3 AF |
62 | fi |
63 | ||
d6f114b9 ER |
64 | %triggerpostun -- apache1-mod_%{mod_name} < 1-1.1 |
65 | # check that they're not using old apache.conf | |
66 | if grep -q '^Include conf\.d' /etc/apache/apache.conf; then | |
67 | %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
68 | fi | |
69 | ||
609e82f3 AF |
70 | %files |
71 | %defattr(644,root,root,755) | |
48831238 | 72 | %doc README |
12784f84 | 73 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
609e82f3 | 74 | %attr(755,root,root) %{_pkglibdir}/* |