]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.macros
- fixed & simplified (not tested with HEAD, but works on AC-branch)
[packages/rpm.git] / rpm.macros
index 3b374576203404f6faa237dc6349ffa429692bee..e493fac3448b7abcf0fbe6dbb58e6e0448e8d5ff 100644 (file)
@@ -687,7 +687,7 @@ if [ "$1" = "1" ] && [ "$2" = "1" ] && [ -d %{__apache_confdir %{-v*}} ]; then\
        ln -sf %{-c*}%{!-c:%{_sysconfdir}/apache-%{name}.conf} %{__apache_confdir %{-v*}}/%{-n*}%{!-n:99}_%{name}.conf\
 fi\
 # restart apache if the config symlink is there\
-if [ -L /etc/apache/conf.d/%{-n*}%{!-n:99}_%{name}.conf ]; then\
+if [ -L %{__apache_confdir %{-v*}}/%{-n*}%{!-n:99}_%{name}.conf ]; then\
        if [ -f /var/lock/subsys/%{__apache_svcname %{-v*}} ]; then\
                /etc/rc.d/init.d/%{__apache_svcname %{-v*}} restart 1>&2\
        fi\
@@ -704,7 +704,7 @@ fi\
 %apache_config_uninstall(v:n:) \
 %{!-v:%{error:apache_config_uninstall: Required argument -v missing}} \
 %{?debug:set -x; echo "apache_config_uninstall:%{-v*} %{name}-%{version}-%{release}: 1:[$1]; 2:[$2]"} \
-# remove link if eighter of the packages are gone \
+# remove link if either of the packages are gone \
 if [ "$1" = "0" ] || [ "$2" = "0" ]; then \
        if [ -L %{__apache_confdir %{-v*}}/%{-n*}%{!-n:99}_%{name}.conf ]; then \
                rm -f %{__apache_confdir %{-v*}}/%{-n*}%{!-n:99}_%{name}.conf \
@@ -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.031102 seconds and 4 git commands to generate.