SPECS: template-apache1_module.spec - use %service macro - describ...
glen
glen at pld-linux.org
Mon Aug 8 16:35:04 CEST 2005
Author: glen Date: Mon Aug 8 14:35:04 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use %service macro
- describe VERSION constant more precisely
---- Files affected:
SPECS:
template-apache1_module.spec (1.7 -> 1.8)
---- Diffs:
================================================================
Index: SPECS/template-apache1_module.spec
diff -u SPECS/template-apache1_module.spec:1.7 SPECS/template-apache1_module.spec:1.8
--- SPECS/template-apache1_module.spec:1.7 Sat Jul 16 11:51:31 2005
+++ SPECS/template-apache1_module.spec Mon Aug 8 16:34:59 2005
@@ -3,7 +3,9 @@
%bcond_without ipv6 # disable IPv6 support
#
# Replace MODNAME with real module name (example for mod_example)
-# Replace VERSION with version since what confdir support was introduced for the module.
+# Replace VERSION with version since what confdir support was
+# introduced for the module. only needed for older .specs, not needed
+# for new packages.
#
%define mod_name MODNAME
%define apxs %{_sbindir}/apxs1
@@ -19,6 +21,7 @@
Source1: %{name}.conf
URL: -
BuildRequires: apache1-devel >= 1.3.33-2
+BuildRequires: rpmbuild(macros) >= 1.228
%{?with_ipv6:BuildRequires: apache1(ipv6)-devel}
%{!?with_ipv6:BuildConflicts: apache1(ipv6)-devel}
Requires(triggerpostun): %{apxs}
@@ -60,20 +63,15 @@
rm -rf $RPM_BUILD_ROOT
%post
-if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
-fi
+%service apache restart
%postun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
- fi
+ %service -q apache restart
fi
-# trigger for upgrading from pre confdir module
-
-# if they had Include modulename.conf
+%if 0 # triggers for upgrading from pre confdir module
+# if there was "Include modulename.conf"
%triggerpostun -- %{name} < VERSION
if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
%{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
@@ -86,17 +84,17 @@
s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
' /etc/apache/apache.conf
fi
-if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
-fi
+%service apache restart
-# or it was just apxs
+# or, if there was just apxs usage
%triggerpostun -- apache1-mod_%{mod_name} < VERSION
# 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
+%endif
+
%files
%defattr(644,root,root,755)
%doc README
@@ -109,6 +107,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.8 2005/08/08 14:34:59 glen
+- use %service macro
+- describe VERSION constant more precisely
+
Revision 1.7 2005/07/16 09:51:31 glen
- adapterized. ipv6 comments. VERSION was for trigger not for package version
@@ -133,4 +135,3 @@
Revision 1.1 2005/01/14 22:59:05 glen
- created based on apache1-mod_rpaf.spec
-
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/template-apache1_module.spec?r1=1.7&r2=1.8&f=u
More information about the pld-cvs-commit
mailing list