3 %bcond_with license_agreement # generates package
7 %define _ver_patch 61.0
8 Summary: Flash plugin for Netscape-compatible WWW browsers
9 Summary(pl): Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape
10 %define base_name macromedia-flash
11 %if %{with license_agreement}
14 Name: %{base_name}-installer
16 Version: %{_ver_major}.%{_ver_minor}.%{_ver_patch}
18 Release: %{_rel}%{?with_license_agreement:wla}
19 License: Free to use, non-distributable
20 Group: X11/Applications/Multimedia
21 %if %{with license_agreement}
22 Source0: http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_%{_ver_major}_linux.tar.gz
23 # NoSource0-md5: b063b512076d4c88a56cb7521e6b5409
25 Source0: license-installer.sh
27 URL: http://www.macromedia.com/software/flashplayer/
28 %if %{with license_agreement}
29 BuildRequires: rpmbuild(macros) >= 1.236
31 Requires: browser-plugins(%{_target_cpu})
32 %if %{without license_agreement}
34 Requires: rpm-build-tools
37 Obsoletes: flash-plugin
38 Obsoletes: mozilla-plugin-macromedia-flash
39 Obsoletes: mozilla-firefox-plugin-macromedia-flash
40 Obsoletes: konqueror-plugin-macromedia-flash
41 ExclusiveArch: %{ix86}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 %define _plugindir %{_libdir}/browser-plugins
46 # TODO: galeon and skipstone.
47 # use macro, otherwise extra LF inserted along with the ifarch
48 %define browsers mozilla, mozilla-firefox, konqueror, opera
51 Flash plugin for Netscape-compatible WWW browsers.
53 Supported browsers: %{browsers}.
56 Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape.
58 Obs³ugiwane przegl±darki: %{browsers}.
61 %if %{with license_agreement}
62 %setup -q -n install_flash_player_7_linux
66 rm -rf $RPM_BUILD_ROOT
67 %if %{without license_agreement}
68 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
71 s/@BASE_NAME@/%{base_name}/g
72 s/@TARGET_CPU@/%{_target_cpu}/g
73 s-@VERSION@-%{version}-g
74 s-@RELEASE@-%{release}-g
75 s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
76 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
78 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
82 install -d $RPM_BUILD_ROOT%{_plugindir}
83 install *.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
88 rm -rf $RPM_BUILD_ROOT
90 %if %{without license_agreement}
92 %{_bindir}/%{base_name}.install
96 %triggerin -- mozilla-firefox
97 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
99 %triggerun -- mozilla-firefox
100 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
102 %triggerin -- mozilla
103 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
104 if [ -d /usr/%{_lib}/mozilla ]; then
106 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
107 if [ -x /usr/bin/regxpcom ]; then
108 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
112 %triggerun -- mozilla
113 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
114 if [ -d /usr/%{_lib}/mozilla ]; then
116 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
117 if [ -x /usr/bin/regxpcom ]; then
118 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
122 %triggerin -- konqueror
123 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
125 %triggerun -- konqueror
126 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
129 %nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
132 %nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
134 # as rpm removes the old obsoleted package files after the triggers
135 # above are ran, add another trigger to make the links there.
136 %triggerpostun -- mozilla-firefox-plugin-macromedia-flash
137 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
139 %triggerpostun -- mozilla-plugin-macromedia-flash
140 %nsplugin_install -f -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
142 %triggerpostun -- konqueror-plugin-macromedia-flash
143 %nsplugin_install -f -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
147 %defattr(644,root,root,755)
149 %if %{without license_agreement}
150 %attr(755,root,root) %{_bindir}/%{base_name}.install
151 %{_datadir}/%{base_name}
155 %attr(755,root,root) %{_plugindir}/*.so