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}
28 Requires: rpm-build-tools
32 Obsoletes: flash-plugin
33 Obsoletes: mozilla-plugin-macromedia-flash
34 Obsoletes: mozilla-firefox-plugin-macromedia-flash
35 Obsoletes: konqueror-plugin-macromedia-flash
36 ExclusiveArch: %{ix86}
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _plugindir %{_libdir}/browser-plugins
41 # TODO: galeon and skipstone.
42 # use macro, otherwise extra LF inserted along with the ifarch
43 %define browsers mozilla, mozilla-firefox, konqueror, opera
46 Flash plugin for Netscape-compatible WWW browsers.
48 Supported browsers: %{browsers}.
51 Wtyczka Flash dla przeglĀ±darek WWW zgodnych z Netscape.
53 Supported browsers: %{browsers}.
56 %if %{with license_agreement}
57 %setup -q -n install_flash_player_7_linux
61 rm -rf $RPM_BUILD_ROOT
62 %if %{without license_agreement}
63 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
66 s/@BASE_NAME@/%{base_name}/g
67 s/@TARGET_CPU@/%{_target_cpu}/g
68 s-@VERSION@-%{version}-g
69 s-@RELEASE@-%{release}-g
70 s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
71 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
73 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
77 install -d $RPM_BUILD_ROOT%{_plugindir}
78 install *.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
83 rm -rf $RPM_BUILD_ROOT
85 %if %{without license_agreement}
87 %{_bindir}/%{base_name}.install
91 %triggerin -- mozilla-firefox
92 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
94 %triggerun -- mozilla-firefox
95 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
98 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
99 if [ -d /usr/%{_lib}/mozilla ]; then
101 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
102 if [ -x /usr/bin/regxpcom ]; then
103 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
107 %triggerun -- mozilla
108 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
109 if [ -d /usr/%{_lib}/mozilla ]; then
111 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
112 if [ -x /usr/bin/regxpcom ]; then
113 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
117 %triggerin -- konqueror
118 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
120 %triggerun -- konqueror
121 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
124 %nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
127 %nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
132 %defattr(644,root,root,755)
134 %if %{without license_agreement}
135 %attr(755,root,root) %{_bindir}/%{base_name}.install
136 %{_datadir}/%{base_name}
139 %attr(755,root,root) %{_plugindir}/*.so