]> git.pld-linux.org Git - packages/apache-mod_gzip.git/blobdiff - apache-mod_gzip.spec
- massive attack s/pld.org.pl/pld-linux.org/
[packages/apache-mod_gzip.git] / apache-mod_gzip.spec
index 8ec3a0be0d4aed3a2038d3c0431300a76dd157f2..fc918590c120ad162a33a58262dcf7854b8f78f3 100644 (file)
@@ -3,36 +3,25 @@
 Summary:       Apache module: On-the-fly compression of HTML documents
 Summary(pl):   Modu³ do apache: kompresuje dokumenty HTML w locie
 Name:          apache-mod_%{mod_name}
-Version:       1.3.19.1a
+Version:       1.3.26.1a
 Release:       2
-License:       Apache Software License
+License:       Apache
 Group:         Networking/Daemons
-Group(cs):     Sí»ové/Démoni
-Group(da):     Netværks/Dæmoner
-Group(de):     Netzwerkwesen/Server
-Group(es):     Red/Servidores
-Group(fr):     Réseau/Serveurs
-Group(is):     Net/Púkar
-Group(it):     Rete/Demoni
-Group(no):     Nettverks/Daemoner
-Group(pl):     Sieciowe/Serwery
-Group(pt):     Rede/Servidores
-Group(ru):     óÅÔØ/äÅÍÏÎÙ
-Group(sl):     Omre¾ni/Stre¾niki
-Group(sv):     Nätverk/Demoner
-Group(uk):     íÅÒÅÖÁ/äÅÍÏÎÉ
-Source0:       http://www.remotecommunications.com/apache/mod_%{mod_name}/src/%{version}/mod_%{mod_name}.c
-Source1:       http://www.remotecommunications.com/apache/mod_%{mod_name}/src/%{version}/changes.txt
-Source2:       http://www.remotecommunications.com/apache/mod_%{mod_name}/src/%{version}/commands.txt
-Source3:       http://www.remotecommunications.com/apache/mod_%{mod_name}/src/%{version}/samples.txt
+Source0:       http://dl.sourceforge.net/mod-gzip/mod_gzip-%{version}.tgz
+Source1:       mod_%{mod_name}.logrotate
+Patch0:                mod_%{mod_name}-name_clash.patch
+URL:           http://sourceforge.net/projects/mod-gzip/
 BuildRequires: %{apxs}
 BuildRequires: apache(EAPI)-devel
 BuildRequires: zlib-devel
-Prereq:                %{_sbindir}/apxs
+Requires(post,preun):  %{apxs}
+Requires(post,preun):  grep
+Requires(preun):       fileutils
 Requires:      apache(EAPI)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
+%define         _sysconfdir     /etc/httpd
 
 %description
 Apache module: On-the-fly compression of HTML documents. Browser will
@@ -42,42 +31,50 @@ transparently decompress and display such documents.
 Modu³ do apache: kompresuje dokumenty HTML w locie. Przegl±darki w
 sposób przezroczysty dekompresuj± i wy¶wietlaj± takie dokumenty.
 
-%prep 
-%setup -q -T -c
-cp %{SOURCE0} .
-cp %{SOURCE1} .
-cp %{SOURCE2} .
-cp %{SOURCE3} .
+%prep
+%setup -q -n mod_%{mod_name}-%{version}
+%patch0 -p1
 
 %build
-%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
+%{apxs} -Wc,-Wall,-pipe -c mod_%{mod_name}.c mod_%{mod_name}_debug.c mod_%{mod_name}_compress.c -o mod_%{mod_name}.so
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_pkglibdir}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},/etc/logrotate.d}
 
 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+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
 
-gzip -9nf *.txt
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %post
-%{_sbindir}/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_gzip.conf" /etc/httpd/httpd.conf; then
+        echo "Include /etc/httpd/mod_gzip.conf" >> /etc/httpd/httpd.conf
+fi
 if [ -f /var/lock/subsys/httpd ]; then
-       %{_sysconfdir}/rc.d/init.d/httpd restart 1>&2
+       /etc/rc.d/init.d/httpd restart 1>&2
 fi
 
 %preun
 if [ "$1" = "0" ]; then
-       %{_sbindir}/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+       umask 027
+       grep -v "^Include.*mod_gzip.conf" /etc/httpd/httpd.conf > \
+                /etc/httpd/httpd.conf.tmp
+        mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
        if [ -f /var/lock/subsys/httpd ]; then
                /etc/rc.d/init.d/httpd restart 1>&2
        fi
 fi
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(644,root,root,755)
-%doc *.gz
+%doc docs/manual/english/*
+%lang(de) %doc docs/manual/deutsch
 %attr(755,root,root) %{_pkglibdir}/*
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_gzip.conf
+%attr(640,root,root) %config(noreplace) /etc/logrotate.d/*
This page took 0.056149 seconds and 4 git commands to generate.