packages: rpm-build-macros/rpm-build-macros.spec, rpm-build-macros/rpm.macr...

glen glen at pld-linux.org
Sun Dec 4 01:02:04 CET 2011


Author: glen                         Date: Sun Dec  4 00:02:04 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- escaping for systemd macros

---- Files affected:
packages/rpm-build-macros:
   rpm-build-macros.spec (1.301 -> 1.302) , rpm.macros (1.621 -> 1.622) 

---- Diffs:

================================================================
Index: packages/rpm-build-macros/rpm-build-macros.spec
diff -u packages/rpm-build-macros/rpm-build-macros.spec:1.301 packages/rpm-build-macros/rpm-build-macros.spec:1.302
--- packages/rpm-build-macros/rpm-build-macros.spec:1.301	Sat Dec  3 23:47:11 2011
+++ packages/rpm-build-macros/rpm-build-macros.spec	Sun Dec  4 01:01:59 2011
@@ -1,5 +1,5 @@
 # $Revision$, $Date$
-%define		rpm_macros_rev	1.620
+%define		rpm_macros_rev	1.622
 %define		find_lang_rev	1.35
 Summary:	PLD Linux RPM build macros
 Summary(pl.UTF-8):	Makra do budowania pakietów RPM dla Linuksa PLD
@@ -92,6 +92,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.302  2011/12/04 00:01:59  glen
+- escaping for systemd macros
+
 Revision 1.301  2011/12/03 22:47:11  cactus
 - up to 1.620; with systemd
 

================================================================
Index: packages/rpm-build-macros/rpm.macros
diff -u packages/rpm-build-macros/rpm.macros:1.621 packages/rpm-build-macros/rpm.macros:1.622
--- packages/rpm-build-macros/rpm.macros:1.621	Sat Dec  3 23:47:11 2011
+++ packages/rpm-build-macros/rpm.macros	Sun Dec  4 01:01:59 2011
@@ -2052,10 +2052,10 @@
 #
 # Sample:
 # %post systemd
-# %systemd_post %{name}
+# %systemd_post
 # or if service must be enabled by default:
 # %post systemd
-# %systemd_post %{name}
+# %systemd_post
 # %systemd_enable %{name}
 #
 # %preun systemd
@@ -2065,33 +2065,29 @@
 # %systemd_postun %{name}
 #
 # Requirements:
-# BuildRequires: rpmbuild(macros) >= 1.620
+# BuildRequires: rpmbuild(macros) >= 1.622
 # Requires:	 rc-scripts >= ...
 
-%systemd_enable() {
-if [ $1 -eq 1 ] ; then 
-    /bin/systemctl enable %1 >/dev/null 2>&1 || : \
-fi \
-}
+%systemd_enable() \
+	if [ $1 -eq 1 ]; then  \
+		/bin/systemctl enable %1 >/dev/null 2>&1 || : \
+	fi
 
-%systemd_post() {
-if [ $1 -eq 1 ] ; then 
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || : \
-fi \
-}
+%systemd_post() \
+	if [ $1 -eq 1 ]; then \
+		/bin/systemctl daemon-reload >/dev/null 2>&1 || : \
+	fi
+
+%systemd_preun() \
+	if [ $1 -eq 0 ]; then \
+		/bin/systemctl --no-reload disable %1 > /dev/null 2>&1 || : \
+		/bin/systemctl stop %1 > /dev/null 2>&1 || : \
+	fi
 
-%systemd_preun() {
-if [ $1 -eq 0 ] ; then \
-    /bin/systemctl --no-reload disable %1 > /dev/null 2>&1 || : \
-    /bin/systemctl stop %1 > /dev/null 2>&1 || : \
-fi \
-}
-                    
-%systemd_postun() {
+%systemd_postun() \
     /bin/systemctl daemon-reload >/dev/null 2>&1 || : \
-    if [ $1 -ge 1 ] ; then \
-    /bin/systemctl try-restart %1 >/dev/null 2>&1 || : \
-fi \
-}
+    if [ $1 -ge 1 ]; then \
+		/bin/systemctl try-restart %1 >/dev/null 2>&1 || : \
+	fi
 
 # EOF
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-macros/rpm-build-macros.spec?r1=1.301&r2=1.302&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/rpm-build-macros/rpm.macros?r1=1.621&r2=1.622&f=u



More information about the pld-cvs-commit mailing list