]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- ns_plugin macros
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 23 Jun 2005 12:50:19 +0000 (12:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.224

rpm.macros

index 7d7c53f346f6a38180cc5b42d8dd23ac7f6f8108..e493fac3448b7abcf0fbe6dbb58e6e0448e8d5ff 100644 (file)
@@ -715,3 +715,28 @@ if [ "$1" = "0" ] || [ "$2" = "0" ]; then \
 fi \
 %{nil}
 
+# see browser-plugins.spec / template-browser-plugin.spec
+# written by glen@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; \
+}
This page took 0.036895 seconds and 4 git commands to generate.