]> git.pld-linux.org Git - packages/apache1-mod_gzip.git/blob - apache1-mod_gzip.spec
- added URL, noted source URL
[packages/apache1-mod_gzip.git] / apache1-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.19.1a
7 Release:        4
8 License:        Apache
9 Group:          Networking/Daemons
10 # working URL: http://www.schroepl.net/_download/mod_gzip-1.3.19.1b.zip
11 Source0:        http://www.remotecommunications.com/apache/mod_%{mod_name}/src/%{version}/mod_%{mod_name}.c
12 Source1:        http://www.remotecommunications.com/apache/mod_%{mod_name}/src/%{version}/changes.txt
13 Source2:        http://www.remotecommunications.com/apache/mod_%{mod_name}/src/%{version}/commands.txt
14 Source3:        http://www.remotecommunications.com/apache/mod_%{mod_name}/src/%{version}/samples.txt
15 Source4:        %{name}.conf
16 URL:            http://www.schroepl.net/projekte/mod_gzip/
17 BuildRequires:  %{apxs}
18 BuildRequires:  apache(EAPI)-devel
19 BuildRequires:  zlib-devel
20 Requires(post,preun):   %{apxs}
21 Requires:       apache(EAPI)
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
25 %define         _sysconfdir     /etc/httpd
26
27 %description
28 Apache module: On-the-fly compression of HTML documents. Browser will
29 transparently decompress and display such documents.
30
31 %description -l pl
32 Modu³ do apache: kompresuje dokumenty HTML w locie. Przegl±darki w
33 sposób przezroczysty dekompresuj± i wy¶wietlaj± takie dokumenty.
34
35 %prep
36 %setup -q -T -c
37 cp %{SOURCE0} .
38 cp %{SOURCE1} .
39 cp %{SOURCE2} .
40 cp %{SOURCE3} .
41
42 %build
43 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
48
49 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
50 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mod_gzip.conf
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %post
56 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
57 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_gzip.conf" /etc/httpd/httpd.conf; then
58         echo "Include /etc/httpd/mod_gzip.conf" >> /etc/httpd/httpd.conf
59 fi
60 if [ -f /var/lock/subsys/httpd ]; then
61         /etc/rc.d/init.d/httpd restart 1>&2
62 fi
63
64 %preun
65 if [ "$1" = "0" ]; then
66         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
67         grep -v "^Include.*mod_gzip.conf" /etc/httpd/httpd.conf > \
68                 /etc/httpd/httpd.conf.tmp
69         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
70         if [ -f /var/lock/subsys/httpd ]; then
71                 /etc/rc.d/init.d/httpd restart 1>&2
72         fi
73 fi
74
75 %files
76 %defattr(644,root,root,755)
77 %doc *.txt
78 %attr(755,root,root) %{_pkglibdir}/*
79 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_gzip.conf
This page took 0.065646 seconds and 3 git commands to generate.