SPECS: apache-mod_vhost_dbi.spec - use config file to load module ...

spider spider at pld-linux.org
Tue Sep 13 13:40:34 CEST 2005


Author: spider                       Date: Tue Sep 13 11:40:34 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use config file to load module (thanks glen)

---- Files affected:
SPECS:
   apache-mod_vhost_dbi.spec (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SPECS/apache-mod_vhost_dbi.spec
diff -u SPECS/apache-mod_vhost_dbi.spec:1.3 SPECS/apache-mod_vhost_dbi.spec:1.4
--- SPECS/apache-mod_vhost_dbi.spec:1.3	Tue Sep 13 11:57:30 2005
+++ SPECS/apache-mod_vhost_dbi.spec	Tue Sep 13 13:40:29 2005
@@ -18,12 +18,12 @@
 BuildRequires:	apache-mod_dbi_pool-devel >= 0.4.0
 BuildRequires:	libtool
 BuildRequires:	sed
-Requires(post,preun):	%{apxs}
 Requires:	apache >= 2.0.40
 Requires:	apache-mod_dbi_pool >= 0.4.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_pkglibdir	%(%{apxs} -q LIBEXECDIR)
+%define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
+%define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
 
 %description
 mod_vhost_dbi creates virtual hosts for Apache 2.0 completely
@@ -53,22 +53,24 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_includedir}/apache}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_includedir}/apache,%{_sysconfdir}/httpd.conf}
 
 install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/79_%{mod_name}.conf
+LoadModule %{mod_name}_module        modules/mod_%{mod_name}.so
+# vim: filetype=apache ts=4 sw=4 et
+EOF
 
 %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
 
 %preun
 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
@@ -84,6 +86,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2005/09/13 11:40:29  spider
+- use config file to load module (thanks glen)
+
 Revision 1.3  2005/09/13 09:57:30  spider
 - configure fix, now work with amd64
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/apache-mod_vhost_dbi.spec?r1=1.3&r2=1.4&f=u




More information about the pld-cvs-commit mailing list