3 %bcond_with license_agreement # generates package
9 %define base_name macromedia-flash
10 Summary: Flash plugin for Netscape-compatible WWW browsers
11 Summary(pl): Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape
12 %if %{with license_agreement}
15 Name: %{base_name}-installer
18 Version: %{_ver_major}.%{_ver_minor}.%{_ver_patch}.%{_ver_serial}
19 Release: %{_rel}%{?with_license_agreement:wla}
20 License: Free to use, non-distributable
21 Group: X11/Applications/Multimedia
22 %if %{with license_agreement}
23 Source0: http://distfiles.gentoo.org/distfiles/flash-plugin-%{_ver_major}.%{_ver_minor}.%{_ver_patch}.tar.gz
24 # NoSource0-md5: a835bc6613c76f62c74a50406bd5801d
26 Source0: license-installer.sh
28 URL: http://www.macromedia.com/software/flashplayer/
29 %if %{with license_agreement}
30 BuildRequires: rpmbuild(macros) >= 1.236
31 Requires: browser-plugins(%{_target_base_arch})
33 Requires: rpm-build-tools
35 Obsoletes: flash-plugin
36 Obsoletes: konqueror-plugin-macromedia-flash
37 Obsoletes: mozilla-firefox-plugin-macromedia-flash
38 Obsoletes: mozilla-plugin-macromedia-flash
39 ExclusiveArch: %{ix86}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define _plugindir %{_libdir}/browser-plugins
44 # TODO: galeon and skipstone.
45 # use macro, otherwise extra LF inserted along with the ifarch
46 %define browsers mozilla, mozilla-firefox, konqueror, opera, seamonkey
49 Flash plugin for Netscape-compatible WWW browsers.
51 Supported browsers: %{browsers}.
54 Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape.
56 Obs³ugiwane przegl±darki: %{browsers}.
59 %if %{with license_agreement}
60 %setup -q -n install_flash_player_7_linux
64 rm -rf $RPM_BUILD_ROOT
65 %if %{without license_agreement}
66 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
69 s/@BASE_NAME@/%{base_name}/g
70 s/@TARGET_CPU@/%{_target_cpu}/g
71 s-@VERSION@-%{version}-g
72 s-@RELEASE@-%{release}-g
73 s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
74 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
76 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
80 install -d $RPM_BUILD_ROOT%{_plugindir}
81 install *.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
86 rm -rf $RPM_BUILD_ROOT
88 %if %{without license_agreement}
90 %{_bindir}/%{base_name}.install
94 %triggerin -- mozilla-firefox
95 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
97 %triggerun -- mozilla-firefox
98 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
100 %triggerin -- mozilla
101 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
103 %triggerun -- mozilla
104 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
106 %triggerin -- konqueror
107 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
109 %triggerun -- konqueror
110 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
113 %nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
116 %nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
118 %triggerin -- seamonkey
119 %nsplugin_install -d %{_libdir}/seamonkey/plugins libflashplayer.so flashplayer.xpt
121 %triggerun -- seamonkey
122 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins libflashplayer.so flashplayer.xpt
124 # as rpm removes the old obsoleted package files after the triggers
125 # above are ran, add another trigger to make the links there.
126 %triggerpostun -- mozilla-firefox-plugin-macromedia-flash
127 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
129 %triggerpostun -- mozilla-plugin-macromedia-flash
130 %nsplugin_install -f -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
132 %triggerpostun -- konqueror-plugin-macromedia-flash
133 %nsplugin_install -f -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
137 %defattr(644,root,root,755)
139 %if %{without license_agreement}
140 %attr(755,root,root) %{_bindir}/%{base_name}.install
141 %{_datadir}/%{base_name}
145 %attr(755,root,root) %{_plugindir}/*.so