]> git.pld-linux.org Git - projects/template-specs.git/blob - browser-plugin.spec
- tabs in preamble
[projects/template-specs.git] / browser-plugin.spec
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 #
6 Summary:        NAME Browser plugin
7 Summary(pl.UTF-8):      Wtyczka NAME dla przeglądarek WWW
8 Name:           template-browser-plugin
9 Version:        0.1
10 Release:        0.1
11 License:        GPL
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)
16
17 # directory where you store the plugin
18 %define         _plugindir      %{_libdir}/browser-plugins
19
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
24 %description
25 NAME browser plugin.
26
27 Supported browsers: %{browsers}.
28
29 %description -l pl.UTF-8
30 Wtyczka NAME dla przeglądarek WWW.
31
32 Obsługiwane przeglądarki: %{browsers}.
33
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
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %triggerin -- mozilla-firefox
52 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi
53
54 %triggerun -- mozilla-firefox
55 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins %{name}.so %{name}.xpi
56
57 %triggerin -- mozilla
58 %nsplugin_install -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi
59
60 %triggerun -- mozilla
61 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins %{name}.so %{name}.xpi
62
63 %triggerin -- opera
64 %nsplugin_install -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi
65
66 %triggerun -- opera
67 %nsplugin_uninstall -d %{_libdir}/opera/plugins %{name}.so %{name}.xpi
68
69 %triggerin -- konqueror
70 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi
71
72 %triggerun -- konqueror
73 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror %{name}.so %{name}.xpi
74
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
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
85
86 %files
87 %defattr(644,root,root,755)
88 %attr(755,root,root) %{_plugindir}/*.so
89 %{_plugindir}/*.xpi
This page took 0.055488 seconds and 3 git commands to generate.