SOURCES (AC-branch): rpm.macros, rpm.macros - ns_plugin macros

glen glen at pld-linux.org
Thu Jun 23 14:50:24 CEST 2005


Author: glen                         Date: Thu Jun 23 12:50:24 2005 GMT
Module: SOURCES                       Tag: AC-branch
---- Log message:
- ns_plugin macros

---- Files affected:
SOURCES:
   rpm.macros (1.158.4.46 -> 1.158.4.47) 
SOURCES:
   rpm.macros (1.223 -> 1.224) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.158.4.46 SOURCES/rpm.macros:1.158.4.47
--- SOURCES/rpm.macros:1.158.4.46	Thu Jun 23 09:28:39 2005
+++ SOURCES/rpm.macros	Thu Jun 23 14:50:18 2005
@@ -714,3 +714,28 @@
 fi \
 %{nil}
 
+# see browser-plugins.spec / template-browser-plugin.spec
+# written by glen at pld-linux.org.
+%ns_plugin_install(d:) { \
+# create link if it's first install of either of the packages \
+if [ "$1" = "1" ] && [ "$2" = "1" ]; then \
+( \
+%( \
+	for file in %{*}; do \
+		echo echo Installing $file to %{-d*}; \
+		echo "ln -sf %{_libdir}/browser-plugins/$file %{-d*};"; \
+	done ) \
+) | ( %banner -t 5 -e %{name}-in ); fi; \
+}
+
+%ns_plugin_uninstall(d:) { \
+# remove link if either of the packages are gone \
+if [ "$1" = "0" ] || [ "$2" = "0" ]; then \
+( \
+%( \
+	for file in %{*}; do \
+		echo echo Removing $file from %{-d*}; \
+		echo "rm -f %{-d*}/$file;"; \
+	done ) \
+) | ( %banner -t 5 -e %{name}-un ); fi; \
+}

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.223 SOURCES/rpm.macros:1.224
--- SOURCES/rpm.macros:1.223	Sun Jun 12 11:02:51 2005
+++ SOURCES/rpm.macros	Thu Jun 23 14:50:19 2005
@@ -715,3 +715,28 @@
 fi \
 %{nil}
 
+# see browser-plugins.spec / template-browser-plugin.spec
+# written by glen at pld-linux.org.
+%ns_plugin_install(d:) { \
+# create link if it's first install of either of the packages \
+if [ "$1" = "1" ] && [ "$2" = "1" ]; then \
+( \
+%( \
+	for file in %{*}; do \
+		echo echo Installing $file to %{-d*}; \
+		echo "ln -sf %{_libdir}/browser-plugins/$file %{-d*};"; \
+	done ) \
+) | ( %banner -t 5 -e %{name}-in ); fi; \
+}
+
+%ns_plugin_uninstall(d:) { \
+# remove link if either of the packages are gone \
+if [ "$1" = "0" ] || [ "$2" = "0" ]; then \
+( \
+%( \
+	for file in %{*}; do \
+		echo echo Removing $file from %{-d*}; \
+		echo "rm -f %{-d*}/$file;"; \
+	done ) \
+) | ( %banner -t 5 -e %{name}-un ); fi; \
+}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/rpm.macros?r1=1.158.4.46&r2=1.158.4.47&f=u
    http://cvs.pld-linux.org/SOURCES/rpm.macros?r1=1.223&r2=1.224&f=u




More information about the pld-cvs-commit mailing list