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://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz
24 # NoSource0-md5: 0b234c5d0eaf254ef8af364fb9ed97f2
26 Source0: license-installer.sh
27 # NoSource0-md5: 0b234c5d0eaf254ef8af364fb9ed97f2
29 URL: http://www.adobe.com/products/flashplayer/
30 %if %{with license_agreement}
31 BuildRequires: rpmbuild(macros) >= 1.236
32 Requires: browser-plugins(%{_target_base_arch})
34 Requires: rpm-build-tools
36 Obsoletes: flash-plugin
37 Obsoletes: konqueror-plugin-macromedia-flash
38 Obsoletes: mozilla-firefox-plugin-macromedia-flash
39 Obsoletes: mozilla-plugin-macromedia-flash
40 ExclusiveArch: %{ix86}
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define _plugindir %{_libdir}/browser-plugins
45 # TODO: galeon and skipstone.
46 # use macro, otherwise extra LF inserted along with the ifarch
47 %define browsers mozilla, mozilla-firefox, konqueror, opera, seamonkey
50 Flash plugin for Netscape-compatible WWW browsers.
52 Supported browsers: %{browsers}.
55 Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape.
57 Obs³ugiwane przegl±darki: %{browsers}.
60 %if %{with license_agreement}
61 %setup -q -n flash-player-plugin-%{_ver_major}.%{_ver_minor}.%{_ver_patch}.%{_ver_serial}
62 #ver=$(awk '/^Version/{print $2}' Readme.txt)
63 #if [ "$ver" != %{version} ]; then
64 # : This tarball is not version %{version}. Source mentions version $ver. Something wrong
70 rm -rf $RPM_BUILD_ROOT
71 %if %{without license_agreement}
72 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
75 s/@BASE_NAME@/%{base_name}/g
76 s/@TARGET_CPU@/%{_target_cpu}/g
77 s-@VERSION@-%{version}-g
78 s-@RELEASE@-%{release}-g
79 s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
80 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
82 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
86 install -d $RPM_BUILD_ROOT%{_plugindir}
87 install *.so $RPM_BUILD_ROOT%{_plugindir}
92 rm -rf $RPM_BUILD_ROOT
94 %if %{without license_agreement}
96 %{_bindir}/%{base_name}.install
100 %triggerin -- mozilla-firefox
101 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so
103 %triggerun -- mozilla-firefox
104 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so
106 %triggerin -- mozilla
107 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so
109 %triggerun -- mozilla
110 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so
112 %triggerin -- konqueror
113 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
115 %triggerun -- konqueror
116 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
119 %nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
122 %nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
124 %triggerin -- seamonkey
125 %nsplugin_install -d %{_libdir}/seamonkey/plugins libflashplayer.so
127 %triggerun -- seamonkey
128 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins libflashplayer.so
130 # as rpm removes the old obsoleted package files after the triggers
131 # above are ran, add another trigger to make the links there.
132 %triggerpostun -- mozilla-firefox-plugin-macromedia-flash
133 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
135 %triggerpostun -- mozilla-plugin-macromedia-flash
136 %nsplugin_install -f -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
138 %triggerpostun -- konqueror-plugin-macromedia-flash
139 %nsplugin_install -f -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
143 %defattr(644,root,root,755)
145 %if %{without license_agreement}
146 %attr(755,root,root) %{_bindir}/%{base_name}.install
147 %{_datadir}/%{base_name}
151 %attr(755,root,root) %{_plugindir}/*.so