]> git.pld-linux.org Git - packages/apache1-mod_become.git/blobdiff - apache1-mod_become.spec
- confdir enabled apache1
[packages/apache1-mod_become.git] / apache1-mod_become.spec
index 014bf879dcec7a8556b46621c8d700a448b7d07f..70022513c3b9a955d515363e64bd778eb7448622 100644 (file)
@@ -4,23 +4,21 @@ Summary:      Apache module: Become Somebody
 Summary(pl):   Modu³ Apache'a: stawanie siê kim¶
 Name:          apache1-mod_%{mod_name}
 Version:       1.3
-Release:       1
+Release:       1.4
 License:       ?
 Group:         Networking/Daemons
 Source0:       http://www.snert.com/Software/mod_become/mod_become103.tgz
 # Source0-md5: 7bb1607587687dabc711b3b1903947e5
 URL:           http://www.snert.com/Software/mod_become/
-BuildRequires: apache1-devel
+BuildRequires: apache1-devel >= 1.3.33-2
 BuildRequires: %{apxs}
-Requires(post,preun):  %{apxs}
-Requires(post,preun):  grep
-Requires(preun):       fileutils
-Requires:      apache1
+Requires(triggerpostun):       %{apxs}
+Requires:      apache1 >= 1.3.33-2
 Obsoletes:     apache-mod_%{mod_name} <= %{version}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
-%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 This module enables the web server to take on the access rights of a
@@ -48,27 +46,35 @@ PATH=$PATH:%{_sbindir}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
+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
-%{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so
-echo "mod_%{mod_name}: this module is not turned on by default; if you're sure,"
-echo "mod_%{mod_name}: uncomment the appropriate line in Apache's config file"
+echo "mod_%{mod_name}: This module is not turned on by default; if you're sure,"
+echo "mod_%{mod_name}: uncomment the appropriate line in Apache's config file."
 
 %preun
 if [ "$1" = "0" ]; then
-       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
        if [ -f /var/lock/subsys/apache ]; then
                /etc/rc.d/init.d/apache restart 1>&2
        fi
 fi
 
+%triggerpostun -- apache1-mod_%{mod_name} < 1.3-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 CHANGES.txt LICENSE.txt SECURITY.txt index.shtml notes-conf.txt
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.060852 seconds and 4 git commands to generate.