]> git.pld-linux.org Git - packages/apache1-mod_gzip.git/blob - apache1-mod_gzip.spec
- oops, it's 3.7-4 not 3.7.4
[packages/apache1-mod_gzip.git] / apache1-mod_gzip.spec
1 %define         mod_name        gzip
2 %define         apxs            /usr/sbin/apxs1
3 Summary:        Apache module: On-the-fly compression of HTML documents
4 Summary(pl.UTF-8):      Moduł do apache: kompresuje dokumenty HTML w locie
5 Name:           apache1-mod_%{mod_name}
6 Version:        1.3.26.1a
7 Release:        3
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:        %{name}.conf
13 Source2:        %{name}.logrotate
14 Patch0:         %{name}-name_clash.patch
15 Patch1:         %{name}-security.patch
16 URL:            http://www.schroepl.net/projekte/mod_gzip/
17 BuildRequires:  apache1-apxs
18 BuildRequires:  apache1-devel >= 1.3.33-2
19 BuildRequires:  rpmbuild(macros) >= 1.268
20 BuildRequires:  zlib-devel
21 Requires(triggerpostun):        %{apxs}
22 Requires(triggerpostun):        grep
23 Requires(triggerpostun):        sed >= 4.0
24 Requires:       apache1(EAPI)
25 Obsoletes:      apache-mod_gzip <= 1.3.26.1a
26 Conflicts:      logrotate < 3.7-4
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
30 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
31 %define         _pkglogdir      %(%{apxs} -q PREFIX 2>/dev/null)/logs
32
33 %description
34 Apache module: On-the-fly compression of HTML documents. Browser will
35 transparently decompress and display such documents.
36
37 %description -l pl.UTF-8
38 Moduł do apache: kompresuje dokumenty HTML w locie. Przeglądarki w
39 sposób przezroczysty dekompresują i wyświetlają takie dokumenty.
40
41 %prep
42 %setup -q -n mod_%{mod_name}-%{version}
43 %patch0 -p1
44 %patch1 -p1
45
46 %build
47 %{apxs} -Wc,-Wall,-pipe -c mod_%{mod_name}.c mod_%{mod_name}_debug.c mod_%{mod_name}_compress.c -o mod_%{mod_name}.so
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,/etc/logrotate.d,%{_pkglogdir}}
52
53 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
54 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
55 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
56
57 > $RPM_BUILD_ROOT%{_pkglogdir}/mod_gzip.log
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post
63 %service -q apache restart
64
65 %postun
66 if [ "$1" = "0" ]; then
67         %service -q apache restart
68 fi
69
70 %triggerpostun -- %{name} < 1.3.26.1a-1.1
71 if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
72         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
73         sed -i -e '
74                 /^Include.*mod_%{mod_name}\.conf/d
75         ' /etc/apache/apache.conf
76 else
77         # they're still using old apache.conf
78         sed -i -e '
79                 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
80         ' /etc/apache/apache.conf
81 fi
82 %service -q apache restart
83
84 %files
85 %defattr(644,root,root,755)
86 %doc docs/manual/english/*
87 %lang(de) %doc docs/manual/deutsch
88 %attr(755,root,root) %{_pkglibdir}/*
89 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
90 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
91 %attr(640,root,root) %ghost %{_pkglogdir}/*
This page took 0.062678 seconds and 3 git commands to generate.