]> git.pld-linux.org Git - packages/apache-mod_gzip.git/blobdiff - apache-mod_gzip.spec
- fix config dir
[packages/apache-mod_gzip.git] / apache-mod_gzip.spec
index 2febb0b6264222bc25dd1682dc071479ddec5359..1b41f6cc984e1eba07f182c02581dd25e99b7cab 100644 (file)
@@ -1,74 +1,59 @@
 %define                mod_name        gzip
 %define        apxs            /usr/sbin/apxs
 Summary:       Apache module: On-the-fly compression of HTML documents
-Summary(pl):   Modu³ do apache: kompresuje dokumenty HTML w locie
+Summary(pl.UTF-8):     Moduł do apache: kompresuje dokumenty HTML w locie
 Name:          apache-mod_%{mod_name}
-Version:       1.3.26.1a
-Release:       1
+Version:       2.1.0
+Release:       0.1
 License:       Apache
-Group:         Networking/Daemons
-Source0:       http://dl.sourceforge.net/mod-gzip/mod_gzip-1.3.26.1a.tgz
-URL:           http://sourceforge.net/projects/mod-gzip/
+Group:         Networking/Daemons/HTTP
+Source0:       http://www.gknw.net/development/apache/httpd-2.0/unix/modules/mod_%{mod_name}-%{version}.tar.gz
+# Source0-md5: 9011aa2dc4701c0301e6c608269f8835
+Source1:       %{name}.conf
+URL:           http://www.gknw.net/development/apache/
 BuildRequires: %{apxs}
-BuildRequires: apache(EAPI)-devel
+BuildRequires: apache-devel >= 2.0.40
+BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: zlib-devel
-Requires(post,preun):  %{apxs}
-Requires(post,preun):  grep
-Requires(preun):       fileutils
-Requires:      apache(EAPI)
+Requires:      apache(modules-api) = %apache_modules_api
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
-%define         _sysconfdir     /etc/httpd
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
 
 %description
 Apache module: On-the-fly compression of HTML documents. Browser will
 transparently decompress and display such documents.
 
-%description -l pl
-Modu³ do apache: kompresuje dokumenty HTML w locie. Przegl±darki w
-sposób przezroczysty dekompresuj± i wy¶wietlaj± takie dokumenty.
+%description -l pl.UTF-8
+Moduł do apache: kompresuje dokumenty HTML w locie. Przeglądarki w
+sposób przezroczysty dekompresują i wyświetlają takie dokumenty.
 
 %prep
 %setup -q -n mod_%{mod_name}-%{version}
 
 %build
-%{apxs} -Wc,-Wall,-pipe -c mod_%{mod_name}.c mod_%{mod_name}_debug.c mod_%{mod_name}_compress.c -o mod_%{mod_name}.so
+%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
-
-install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
-install docs/mod_gzip.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/mod_gzip.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
+install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{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
-       /etc/rc.d/init.d/httpd restart 1>&2
-fi
+%service -q httpd restart
 
-%preun
+%postun
 if [ "$1" = "0" ]; then
-       %{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
+       %service -q httpd restart
 fi
 
 %files
 %defattr(644,root,root,755)
-%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
+%doc *.txt logos/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.25907 seconds and 4 git commands to generate.