]>
Commit | Line | Data |
---|---|---|
01e6d23d ER |
1 | # |
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. | |
5 | # | |
66de52ac ER |
6 | Summary: NAME Browser plugin |
7 | Summary(pl): NAME Browser plugin | |
01e6d23d ER |
8 | Name: template-browser-plugin |
9 | Version: 0.1 | |
10 | Release: 0.1 | |
11 | License: GPL | |
b110b56a | 12 | Group: X11/Applications/Multimedia |
444e4d2a | 13 | BuildRequires: rpmbuild(macros) >= 1.236 |
7e895160 | 14 | Requires: browser-plugins(%{_target_base_arch}) |
01e6d23d ER |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
16 | ||
17 | # directory where you store the plugin | |
18 | %define _plugindir %{_libdir}/browser-plugins | |
19 | ||
20 | %description | |
21 | This spec is for demonstrating triggers used for linking package | |
22 | plugins to all browsers plugins dir capable for NSAPI plugins | |
23 | ||
24 | See also browser-plugins.spec | |
25 | ||
26 | %prep | |
27 | %setup -q -c -T | |
28 | ||
29 | %install | |
30 | rm -rf $RPM_BUILD_ROOT | |
31 | install -d $RPM_BUILD_ROOT%{_plugindir} | |
32 | ||
33 | cat >> $RPM_BUILD_ROOT%{_plugindir}/%{name}.so <<EOF | |
34 | # dummy plugin | |
35 | EOF | |
36 | cat >> $RPM_BUILD_ROOT%{_plugindir}/%{name}.xpi <<EOF | |
37 | # Second plugin file. | |
38 | EOF | |
39 | ||
40 | %triggerin -- mozilla-firefox | |
444e4d2a | 41 | %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
42 | |
43 | %triggerun -- mozilla-firefox | |
444e4d2a | 44 | %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
45 | |
46 | %triggerin -- mozilla | |
444e4d2a | 47 | %nsplugin_install -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
48 | |
49 | %triggerun -- mozilla | |
444e4d2a | 50 | %nsplugin_uninstall -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
51 | |
52 | %triggerin -- opera | |
444e4d2a | 53 | %nsplugin_install -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
54 | |
55 | %triggerun -- opera | |
444e4d2a | 56 | %nsplugin_uninstall -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
57 | |
58 | %triggerin -- konqueror | |
444e4d2a | 59 | %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi |
01e6d23d ER |
60 | |
61 | %triggerun -- konqueror | |
444e4d2a ER |
62 | %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi |
63 | ||
f5c90abe AG |
64 | %triggerin -- seamonkey |
65 | %nsplugin_install -d %{_libdir}/seamonkey/plugins %{name}.so %{name}.xpi | |
66 | ||
67 | %triggerun -- seamonkey | |
68 | %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins %{name}.so %{name}.xpi | |
69 | ||
444e4d2a ER |
70 | # as rpm removes the old obsoleted package files after the triggers |
71 | # are ran, add another trigger to make the links there. | |
72 | %triggerpostun -- mozilla-firefox-plugin-macromedia-flash | |
73 | %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt | |
01e6d23d ER |
74 | |
75 | %clean | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
78 | %files | |
79 | %defattr(644,root,root,755) | |
80 | %attr(755,root,root) %{_plugindir}/*.so | |
81 | %{_plugindir}/*.xpi |