]>
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 | 6 | Summary: NAME Browser plugin |
ce39d734 | 7 | Summary(pl.UTF-8): Wtyczka NAME dla przeglądarek WWW |
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 | ||
5ac49963 ER |
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 | |
23 | ||
01e6d23d | 24 | %description |
5ac49963 | 25 | NAME browser plugin. |
01e6d23d | 26 | |
5ac49963 | 27 | Supported browsers: %{browsers}. |
01e6d23d | 28 | |
9be49f18 JR |
29 | %description -l pl.UTF-8 |
30 | Wtyczka NAME dla przeglądarek WWW. | |
b50419ec | 31 | |
9be49f18 | 32 | Obsługiwane przeglądarki: %{browsers}. |
b50419ec | 33 | |
01e6d23d ER |
34 | %prep |
35 | %setup -q -c -T | |
36 | ||
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
39 | install -d $RPM_BUILD_ROOT%{_plugindir} | |
40 | ||
41 | cat >> $RPM_BUILD_ROOT%{_plugindir}/%{name}.so <<EOF | |
42 | # dummy plugin | |
43 | EOF | |
44 | cat >> $RPM_BUILD_ROOT%{_plugindir}/%{name}.xpi <<EOF | |
45 | # Second plugin file. | |
46 | EOF | |
47 | ||
b50419ec JB |
48 | %clean |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
01e6d23d | 51 | %triggerin -- mozilla-firefox |
444e4d2a | 52 | %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
53 | |
54 | %triggerun -- mozilla-firefox | |
444e4d2a | 55 | %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
56 | |
57 | %triggerin -- mozilla | |
444e4d2a | 58 | %nsplugin_install -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
59 | |
60 | %triggerun -- mozilla | |
444e4d2a | 61 | %nsplugin_uninstall -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
62 | |
63 | %triggerin -- opera | |
444e4d2a | 64 | %nsplugin_install -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
65 | |
66 | %triggerun -- opera | |
444e4d2a | 67 | %nsplugin_uninstall -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi |
01e6d23d ER |
68 | |
69 | %triggerin -- konqueror | |
444e4d2a | 70 | %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi |
01e6d23d ER |
71 | |
72 | %triggerun -- konqueror | |
444e4d2a ER |
73 | %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi |
74 | ||
f5c90abe AG |
75 | %triggerin -- seamonkey |
76 | %nsplugin_install -d %{_libdir}/seamonkey/plugins %{name}.so %{name}.xpi | |
77 | ||
78 | %triggerun -- seamonkey | |
79 | %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins %{name}.so %{name}.xpi | |
80 | ||
444e4d2a ER |
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 | |
01e6d23d | 85 | |
01e6d23d ER |
86 | %files |
87 | %defattr(644,root,root,755) | |
88 | %attr(755,root,root) %{_plugindir}/*.so | |
89 | %{_plugindir}/*.xpi |