SPECS: apache-mod_dbi_pool.spec - use config file to load module
glen
glen at pld-linux.org
Tue Sep 13 12:23:47 CEST 2005
Author: glen Date: Tue Sep 13 10:23:47 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use config file to load module
---- Files affected:
SPECS:
apache-mod_dbi_pool.spec (1.6 -> 1.7)
---- Diffs:
================================================================
Index: SPECS/apache-mod_dbi_pool.spec
diff -u SPECS/apache-mod_dbi_pool.spec:1.6 SPECS/apache-mod_dbi_pool.spec:1.7
--- SPECS/apache-mod_dbi_pool.spec:1.6 Tue Sep 13 11:08:01 2005
+++ SPECS/apache-mod_dbi_pool.spec Tue Sep 13 12:23:41 2005
@@ -25,7 +25,8 @@
Requires: libdbi >= 0.7.2
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_dbi_pool provides database connection pooling services for other
@@ -70,24 +71,26 @@
%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}
install include/mod_dbi_pool.h $RPM_BUILD_ROOT%{_includedir}/apache
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/75_%{mod_name}.conf
+LoadModule %{mod_name}_module modules/%{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
@@ -95,6 +98,7 @@
%files
%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*.conf
%attr(755,root,root) %{_pkglibdir}/*.so
%files devel
@@ -107,6 +111,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.7 2005/09/13 10:23:41 glen
+- use config file to load module
+
Revision 1.6 2005/09/13 09:08:01 glen
- better sed, use different separator for sed
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/apache-mod_dbi_pool.spec?r1=1.6&r2=1.7&f=u
More information about the pld-cvs-commit
mailing list