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\
%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 \
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; \
+}