]> git.pld-linux.org Git - packages/apache-mod_gzip.git/blob - apache-mod_gzip.spec
- fix logs path
[packages/apache-mod_gzip.git] / apache-mod_gzip.spec
1 %define         mod_name        gzip
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: On-the-fly compression of HTML documents
4 Summary(pl):    Modu³ do apache: kompresuje dokumenty HTML w locie
5 Name:           apache-mod_%{mod_name}
6 Version:        1.3.26.1a
7 Release:        1
8 License:        Apache
9 Group:          Networking/Daemons
10 Source0:        http://dl.sourceforge.net/mod-gzip/mod_gzip-%{version}.tgz
11 URL:            http://sourceforge.net/projects/mod-gzip/
12 BuildRequires:  %{apxs}
13 BuildRequires:  apache(EAPI)-devel
14 BuildRequires:  zlib-devel
15 Requires(post,preun):   %{apxs}
16 Requires(post,preun):   grep
17 Requires(preun):        fileutils
18 Requires:       apache(EAPI)
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
22 %define         _sysconfdir     /etc/httpd
23
24 %description
25 Apache module: On-the-fly compression of HTML documents. Browser will
26 transparently decompress and display such documents.
27
28 %description -l pl
29 Modu³ do apache: kompresuje dokumenty HTML w locie. Przegl±darki w
30 sposób przezroczysty dekompresuj± i wy¶wietlaj± takie dokumenty.
31
32 %prep
33 %setup -q -n mod_%{mod_name}-%{version}
34
35 %build
36 %{apxs} -Wc,-Wall,-pipe -c mod_%{mod_name}.c mod_%{mod_name}_debug.c mod_%{mod_name}_compress.c -o mod_%{mod_name}.so
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
41
42 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
43 sed -e 's#logs/mod_gzip.log#/var/log/httpd/mod_gzip.log#g' docs/mod_gzip.conf.sample > $RPM_BUILD_ROOT%{_sysconfdir}/mod_gzip.conf
44
45 %clean
46 rm -rf $RPM_BUILD_ROOT
47
48 %post
49 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
50 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_gzip.conf" /etc/httpd/httpd.conf; then
51         echo "Include /etc/httpd/mod_gzip.conf" >> /etc/httpd/httpd.conf
52 fi
53 if [ -f /var/lock/subsys/httpd ]; then
54         /etc/rc.d/init.d/httpd restart 1>&2
55 fi
56
57 %preun
58 if [ "$1" = "0" ]; then
59         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
60         umask 027
61         grep -v "^Include.*mod_gzip.conf" /etc/httpd/httpd.conf > \
62                 /etc/httpd/httpd.conf.tmp
63         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
64         if [ -f /var/lock/subsys/httpd ]; then
65                 /etc/rc.d/init.d/httpd restart 1>&2
66         fi
67 fi
68
69 %files
70 %defattr(644,root,root,755)
71 %doc docs/manual/english/*
72 %lang(de) %doc docs/manual/deutsch
73 %attr(755,root,root) %{_pkglibdir}/*
74 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_gzip.conf
This page took 0.0891729999999999 seconds and 3 git commands to generate.