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: NAME Browser plugin
7 Summary(pl.UTF-8): Wtyczka NAME dla przeglądarek WWW
8 Name: template-browser-plugin
12 Group: X11/Applications/Multimedia
13 BuildRequires: rpmbuild(macros) >= 1.236
14 Requires: browser-plugins(%{_target_base_arch})
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 # directory where you store the plugin
18 %define _plugindir %{_libdir}/browser-plugins
20 # TODO: galeon and skipstone.
21 # use macro, otherwise extra LF inserted along with the ifarch
22 %define browsers mozilla, mozilla-firefox, konqueror, opera, seamonkey
27 Supported browsers: %{browsers}.
29 %description -l pl.UTF-8
30 Wtyczka NAME dla przeglądarek WWW.
32 Obsługiwane przeglądarki: %{browsers}.
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT%{_plugindir}
41 cat >> $RPM_BUILD_ROOT%{_plugindir}/%{name}.so <<EOF
44 cat >> $RPM_BUILD_ROOT%{_plugindir}/%{name}.xpi <<EOF
49 rm -rf $RPM_BUILD_ROOT
51 %triggerin -- mozilla-firefox
52 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi
54 %triggerun -- mozilla-firefox
55 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi
58 %nsplugin_install -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi
61 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi
64 %nsplugin_install -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi
67 %nsplugin_uninstall -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi
69 %triggerin -- konqueror
70 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi
72 %triggerun -- konqueror
73 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi
75 %triggerin -- seamonkey
76 %nsplugin_install -d %{_libdir}/seamonkey/plugins %{name}.so %{name}.xpi
78 %triggerun -- seamonkey
79 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins %{name}.so %{name}.xpi
81 # as rpm removes the old obsoleted package files after the triggers
82 # are ran, add another trigger to make the links there.
83 %triggerpostun -- mozilla-firefox-plugin-macromedia-flash
84 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
87 %defattr(644,root,root,755)
88 %attr(755,root,root) %{_plugindir}/*.so