3 %bcond_with license_agreement # generates package
5 Summary: Flash plugin for Netscape-compatible WWW browsers
6 Summary(pl): Wtyczka Flash dla przeglĀ±darek WWW zgodnych z Netscape
7 %define base_name macromedia-flash
8 %if %{with license_agreement}
11 Name: %{base_name}-installer
14 Release: 2.26%{?with_license_agreement:wla}
15 License: Free to use, non-distributable
16 Group: X11/Applications/Multimedia
17 %if %{with license_agreement}
18 Source0: http://fpdownload.macromedia.com/get/shockwave/flash/english/linux/%{version}/install_flash_player_7_linux.tar.gz
19 # NoSource0-md5: 79c59a5ea29347e01c8e6575dd054cd1
21 Source0: license-installer.sh
23 URL: http://www.macromedia.com/software/flash/
24 BuildRequires: rpmbuild(macros) >= 1.235
25 Requires: browser-plugins(%{_target_cpu})
26 %if %{without license_agreement}
27 Requires: /usr/bin/builder
29 Obsoletes: flash-plugin
30 Obsoletes: mozilla-plugin-macromedia-flash
31 Obsoletes: mozilla-firefox-plugin-macromedia-flash
32 Obsoletes: konqueror-plugin-macromedia-flash
33 ExclusiveArch: %{ix86}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _plugindir %{_libdir}/browser-plugins
38 # TODO: galeon and skipstone.
39 # use macro, otherwise extra LF inserted along with the ifarch
40 %define browsers mozilla, mozilla-firefox, konqueror, opera
43 Flash plugin for Netscape-compatible WWW browsers.
45 Supported browsers: %{browsers}.
48 Wtyczka Flash dla przeglĀ±darek WWW zgodnych z Netscape.
50 Supported browsers: %{browsers}.
53 %if %{with license_agreement}
54 %setup -q -n install_flash_player_7_linux
58 rm -rf $RPM_BUILD_ROOT
59 %if %{without license_agreement}
60 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
63 s/@BASE_NAME@/%{base_name}/g
64 s/@TARGET_CPU@/%{_target_cpu}/g
65 s-@VERSION@-%{version}-g
66 s-@RELEASE@-%{release}-g
67 s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
68 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
70 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
74 install -d $RPM_BUILD_ROOT%{_plugindir}
75 install *.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
80 rm -rf $RPM_BUILD_ROOT
82 %if %{without license_agreement}
84 %{_bindir}/%{base_name}.install
88 %triggerin -- mozilla-firefox
89 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
91 %triggerun -- mozilla-firefox
92 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
95 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
96 if [ -d /usr/%{_lib}/mozilla ]; then
98 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
99 if [ -x /usr/bin/regxpcom ]; then
100 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
104 %triggerun -- mozilla
105 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
106 if [ -d /usr/%{_lib}/mozilla ]; then
108 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
109 if [ -x /usr/bin/regxpcom ]; then
110 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
114 %triggerin -- konqueror
115 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
117 %triggerun -- konqueror
118 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
121 %nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
124 %nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
129 %defattr(644,root,root,755)
131 %if %{without license_agreement}
132 %attr(755,root,root) %{_bindir}/%{base_name}.install
133 %{_datadir}/%{base_name}
136 %attr(755,root,root) %{_plugindir}/*.so