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