]> git.pld-linux.org Git - packages/apache1-mod_gunzip.git/blobdiff - apache1-mod_gunzip.spec
- rel 3 (R: apache1(EAPI) instead of apache1)
[packages/apache1-mod_gunzip.git] / apache1-mod_gunzip.spec
index ea4a74cfcc84af4ae1e00746bb22140f46510d4a..253ac02e7be9e36578dfd436f31ede7614635a05 100644 (file)
@@ -1,24 +1,27 @@
 %define                mod_name        gunzip
+%define        apxs            /usr/sbin/apxs1
 Summary:       Apache module: On-the-fly decompression of HTML documents
 Summary(es):   Descompresión instantanea de archivos HTML para Apache
 Summary(pl):   Modu³ do apache: dekompresuje dokumenty HTML w locie
 Summary(pt_BR):        Descompressão "On-the-fly" de arquivos HTML para o Apache
-Name:          apache-mod_%{mod_name}
+Name:          apache1-mod_%{mod_name}
 Version:       1
-Release:       2
-License:       GPL
+Release:       3
+License:       GPL v2
 Group:         Networking/Daemons
-Group(de):     Netzwerkwesen/Server
-Group(pl):     Sieciowe/Serwery
 Source0:       http://sep.hamburg.com/mod_%{mod_name}.tar.gz
-BuildRequires: /usr/sbin/apxs
-BuildRequires: apache(EAPI)-devel
+# Source0-md5: 9f549047abccccf6570333bb0313d2cd
+BuildRequires: %{apxs}
+BuildRequires: apache1-devel >= 1.3.33-2
+BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: zlib-devel
-Prereq:                /usr/sbin/apxs
-Requires:      apache(EAPI)
+Requires(triggerpostun):       %{apxs}
+Requires:      apache1(EAPI)
+Obsoletes:     apache-mod_gunzip <= 1
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _pkglibdir      %(/usr/sbin/apxs -q LIBEXECDIR)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 Apache module: On-the-fly decompression of HTML documents.
@@ -32,35 +35,40 @@ Modu
 %description -l pt_BR
 Descompressão "On-the-fly" de arquivos HTML para o Apache.
 
-%prep 
+%prep
 %setup -q -n mod_%{mod_name}
 
 %build
-/usr/sbin/apxs -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
+%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_pkglibdir}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
 
 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 
+echo 'LoadModule %{mod_name}_module    modules/mod_%{mod_name}.so' > \
+       $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
 %post
-%{_sbindir}/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-if [ -f /var/lock/subsys/httpd ]; then
-       %{_sysconfdir}/rc.d/init.d/httpd restart 1>&2
-fi
+%service -q apache restart
 
-%preun
+%postun
 if [ "$1" = "0" ]; then
-       /usr/sbin/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
+       %service -q apache restart
 fi
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%triggerpostun -- apache1-mod_%{mod_name} < 1-1.1
+# check that they're not using old apache.conf
+if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
+       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+fi
 
 %files
 %defattr(644,root,root,755)
+%doc README
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.095969 seconds and 4 git commands to generate.