]> git.pld-linux.org Git - packages/apache-mod_gzip.git/commitdiff
- include default configuration; release 3
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 23 Mar 2002 21:28:16 +0000 (21:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache-mod_gzip.spec -> 1.8

apache-mod_gzip.spec

index 38b96b6ebd5fe0bf69d74502eeb954fd9a7773d6..7c60d727adf5bfdd62816acd9d6d1b8e417794ab 100644 (file)
@@ -4,13 +4,14 @@ 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
 Summary(pl):   Modu³ do apache: kompresuje dokumenty HTML w locie
 Name:          apache-mod_%{mod_name}
 Version:       1.3.19.1a
-Release:       2
+Release:       3
 License:       Apache Software License
 Group:         Networking/Daemons
 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
 License:       Apache Software License
 Group:         Networking/Daemons
 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
+Source4:       %{name}.conf
 BuildRequires: %{apxs}
 BuildRequires: apache(EAPI)-devel
 BuildRequires: zlib-devel
 BuildRequires: %{apxs}
 BuildRequires: apache(EAPI)-devel
 BuildRequires: zlib-devel
@@ -19,6 +20,7 @@ Requires:     apache(EAPI)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
 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
 
 %description
 Apache module: On-the-fly compression of HTML documents. Browser will
@@ -40,14 +42,18 @@ cp %{SOURCE3} .
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_pkglibdir}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
 
 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 
 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mod_gzip.conf
 
 gzip -9nf *.txt
 
 %post
 %{_sbindir}/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
 
 gzip -9nf *.txt
 
 %post
 %{_sbindir}/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
 fi
 if [ -f /var/lock/subsys/httpd ]; then
        %{_sysconfdir}/rc.d/init.d/httpd restart 1>&2
 fi
@@ -55,6 +61,9 @@ fi
 %preun
 if [ "$1" = "0" ]; then
        %{_sbindir}/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
 %preun
 if [ "$1" = "0" ]; then
        %{_sbindir}/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+       grep -v -q "^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
        if [ -f /var/lock/subsys/httpd ]; then
                /etc/rc.d/init.d/httpd restart 1>&2
        fi
@@ -67,3 +76,4 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc *.gz
 %attr(755,root,root) %{_pkglibdir}/*
 %defattr(644,root,root,755)
 %doc *.gz
 %attr(755,root,root) %{_pkglibdir}/*
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_gzip.conf
This page took 0.071815 seconds and 4 git commands to generate.