3 %bcond_with license_agreement # generates package
9 Summary: Flash plugin for Netscape-compatible WWW browsers
10 Summary(pl): Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape
11 %define base_name macromedia-flash
12 %if %{with license_agreement}
15 Name: %{base_name}-installer
17 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: b063b512076d4c88a56cb7521e6b5409
26 Source0: license-installer.sh
28 URL: http://www.macromedia.com/software/flashplayer/
29 %if %{with license_agreement}
30 BuildRequires: rpmbuild(macros) >= 1.236
32 Requires: browser-plugins(%{_target_cpu})
33 %if %{without license_agreement}
35 Requires: rpm-build-tools
38 Obsoletes: flash-plugin
39 Obsoletes: mozilla-plugin-macromedia-flash
40 Obsoletes: mozilla-firefox-plugin-macromedia-flash
41 Obsoletes: konqueror-plugin-macromedia-flash
42 ExclusiveArch: %{ix86}
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 %define _plugindir %{_libdir}/browser-plugins
47 # TODO: galeon and skipstone.
48 # use macro, otherwise extra LF inserted along with the ifarch
49 %define browsers mozilla, mozilla-firefox, konqueror, opera
52 Flash plugin for Netscape-compatible WWW browsers.
54 Supported browsers: %{browsers}.
57 Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape.
59 Obs³ugiwane przegl±darki: %{browsers}.
62 %if %{with license_agreement}
63 %setup -q -n install_flash_player_7_linux
67 rm -rf $RPM_BUILD_ROOT
68 %if %{without license_agreement}
69 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
72 s/@BASE_NAME@/%{base_name}/g
73 s/@TARGET_CPU@/%{_target_cpu}/g
74 s-@VERSION@-%{version}-g
75 s-@RELEASE@-%{release}-g
76 s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
77 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
79 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
83 install -d $RPM_BUILD_ROOT%{_plugindir}
84 install *.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
89 rm -rf $RPM_BUILD_ROOT
91 %if %{without license_agreement}
93 %{_bindir}/%{base_name}.install
97 %triggerin -- mozilla-firefox
98 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
100 %triggerun -- mozilla-firefox
101 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
103 %triggerin -- mozilla
104 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
105 if [ -d /usr/%{_lib}/mozilla ]; then
107 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
108 if [ -x /usr/bin/regxpcom ]; then
109 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
113 %triggerun -- mozilla
114 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
115 if [ -d /usr/%{_lib}/mozilla ]; then
117 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
118 if [ -x /usr/bin/regxpcom ]; then
119 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
123 %triggerin -- konqueror
124 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
126 %triggerun -- konqueror
127 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
130 %nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
133 %nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
135 # as rpm removes the old obsoleted package files after the triggers
136 # above are ran, add another trigger to make the links there.
137 %triggerpostun -- mozilla-firefox-plugin-macromedia-flash
138 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
140 %triggerpostun -- mozilla-plugin-macromedia-flash
141 %nsplugin_install -f -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
143 %triggerpostun -- konqueror-plugin-macromedia-flash
144 %nsplugin_install -f -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
148 %defattr(644,root,root,755)
150 %if %{without license_agreement}
151 %attr(755,root,root) %{_bindir}/%{base_name}.install
152 %{_datadir}/%{base_name}
156 %attr(755,root,root) %{_plugindir}/*.so