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