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