]> git.pld-linux.org Git - packages/apache-mod_auth_any.git/blobdiff - apache-mod_auth_any.spec
- restart apache in %postun rather in %preun as the config file, loading module
[packages/apache-mod_auth_any.git] / apache-mod_auth_any.spec
index 43a296c206ab6d6718597fe7ab6a5fb81d6157a2..9789cb2de2765fae6526d6091bbb90e37d81b614 100644 (file)
@@ -1,5 +1,5 @@
-%define                mod_name        auth_any
-%define        apxs            /usr/sbin/apxs
+%define        mod_name        auth_any
+%define apxs           /usr/sbin/apxs
 Summary:       Basic authentication for the Apache Web server using arbitrary shell commands
 Summary(cs):   Základní autentizace pro WWW server Apache pomocí shellových pøíkazù
 Summary(da):   En autenticeringsmodul for webtjeneren Apache hvor man kan bruge vilkårlige skal-kommandoer
@@ -12,20 +12,22 @@ Summary(pt):        Um m
 Summary(sl):   Osnovna avtentikacija za spletni stre¾nik Apache, z uporabo poljubnih lupinskih ukazov
 Summary(sv):   Grundläggande autentisering för webbservern Apache med valfria skalkommandon
 Name:          apache-mod_%{mod_name}
-Version:       1.3
+Version:       1.2.2
 Release:       1
+Epoch:         1
 License:       BSD
 Group:         Networking/Daemons
-Source0:       ftp://ftp.itlab.musc.edu/pub/toolbox/mod_%{mod_name}/mod_%{mod_name}-%{version}.tar.gz
-# Source0-md5: 847d209b295a02f48e9ea3d55dac652a
-URL:           http://www.itlab.musc.edu/~nafees/mod_%{mod_name}.html
+Source0:       http://www.itlab.musc.edu/webNIS/dist/mod_%{mod_name}-%{version}-apache2.tar.gz
+# Source0-md5: e9a1825b818d108e1204692da3d7bfd0
+URL:           http://www.itlab.musc.edu/webNIS/mod_auth_any.html
 BuildRequires: %{apxs}
-BuildRequires: apache(EAPI)-devel
-Requires(post,preun):  %{apxs}
-Requires:      apache(EAPI)
+BuildRequires: apache-devel >= 2.0
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires:      apache(modules-api) = %apache_modules_api
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 This module allows you to use any command line program (such as
@@ -71,35 +73,32 @@ servade av en webbserver genom att kontrollera returkoden fr
 godtyckligt angivet kommando.
 
 %prep
-%setup -q -n mod_%{mod_name}
+%setup -q -n mod_%{mod_name}-%{version}-apache2
 
 %build
-%{apxs} -c src/mod_%{mod_name}.c -o mod_%{mod_name}.so
+%{apxs} -c src/mod_%{mod_name}.c -o mod_%{mod_name}.la
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_pkglibdir}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
 
-install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
+       $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{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 httpd restart
 
-%preun
+%postun
 if [ "$1" = "0" ]; then
-       %{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 httpd restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc docs/*
-%attr(755,root,root) %{_pkglibdir}/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.069829 seconds and 4 git commands to generate.