f062f1089f39e40c439c30a8c41c76a3a37376b7
[packages/apache-mod_gzip.git] / apache-mod_gzip.spec
1 # TODO
2 # - add apache_modules_api dep
3 %define         mod_name        gzip
4 %define         apxs            /usr/sbin/apxs
5 Summary:        Apache module: On-the-fly compression of HTML documents
6 Summary(pl):    Modu³ do apache: kompresuje dokumenty HTML w locie
7 Name:           apache-mod_%{mod_name}
8 Version:        2.0.40
9 Release:        0.1
10 License:        Apache
11 Group:          Networking/Daemons
12 Source0:        http://www.gknw.com/development/apache/httpd-2.0/unix/modules/mod_%{mod_name}-%{version}.tar.gz
13 # Source0-md5:  30c17d999edb5d83368369cde1c921bb
14 Source1:        %{name}.conf
15 Source2:        %{name}.logrotate
16 #URL:           http://www.schroepl.net/projekte/mod_gzip/
17 BuildRequires:  %{apxs}
18 BuildRequires:  apache-devel >= 2.0.40
19 BuildRequires:  zlib-devel
20 Requires(triggerpostun):        %{apxs}
21 Requires(triggerpostun):        grep
22 Requires(triggerpostun):        sed >= 4.0
23 Requires:       apache >= 2.0.40
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
27 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
28 %define         _pkglogdir      %(%{apxs} -q PREFIX 2>/dev/null)/logs
29
30 %description
31 Apache module: On-the-fly compression of HTML documents. Browser will
32 transparently decompress and display such documents.
33
34 %description -l pl
35 Modu³ do apache: kompresuje dokumenty HTML w locie. Przegl±darki w
36 sposób przezroczysty dekompresuj± i wy¶wietlaj± takie dokumenty.
37
38 %prep
39 %setup -q -n mod_%{mod_name}
40
41 %build
42 %{apxs} -Wc,-Wall,-pipe -c mod_%{mod_name}.c mod_%{mod_name}_debug.c mod_%{mod_name}_compress.c -o mod_%{mod_name}.so
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,/etc/logrotate.d,%{_pkglogdir}}
47
48 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
49 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
50 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
51
52 > $RPM_BUILD_ROOT%{_pkglogdir}/mod_gzip.log
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %post
58 if [ -f /var/lock/subsys/httpd ]; then
59         /etc/rc.d/init.d/httpd restart 1>&2
60 fi
61
62 %postun
63 if [ "$1" = "0" ]; then
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 *.txt logos/*
72 %attr(755,root,root) %{_pkglibdir}/*
73 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
74 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
75 %attr(640,root,root) %ghost %{_pkglogdir}/*
This page took 0.026994 seconds and 2 git commands to generate.