2 # NOTE: using symlinks will not have rpm file conflicts verification,
3 # but that's okay since most of the plugins are cross browser, so you
4 # won't be having any regular files in browser specific plugin dir.
6 Summary: Template for browser plugins
7 Name: template-browser-plugin
13 BuildRequires: rpmbuild(macros) >= 1.223
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 # directory where you store the plugin
18 %define _plugindir %{_libdir}/browser-plugins
21 This spec is for demonstrating triggers used for linking package
22 plugins to all browsers plugins dir capable for NSAPI plugins
24 See also browser-plugins.spec
30 rm -rf $RPM_BUILD_ROOT
31 install -d $RPM_BUILD_ROOT%{_plugindir}
33 cat >> $RPM_BUILD_ROOT%{_plugindir}/%{name}.so <<EOF
36 cat >> $RPM_BUILD_ROOT%{_plugindir}/%{name}.xpi <<EOF
40 %triggerin -- mozilla-firefox
41 %ns_plugin_install -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi
43 %triggerun -- mozilla-firefox
44 %ns_plugin_uninstall -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi
47 %ns_plugin_install -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi
50 %ns_plugin_uninstall -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi
53 %ns_plugin_install -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi
56 %ns_plugin_uninstall -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi
58 %triggerin -- konqueror
59 %ns_plugin_install -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi
61 %triggerun -- konqueror
62 %ns_plugin_uninstall -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi
65 rm -rf $RPM_BUILD_ROOT
68 %defattr(644,root,root,755)
69 %attr(755,root,root) %{_plugindir}/*.so