# Conditional build:
%bcond_with license_agreement # generates package
#
+%define _ver_major 7
+%define _ver_minor 0
+%define _ver_patch 25
Summary: Flash plugin for Netscape-compatible WWW browsers
Summary(pl): Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape
%define base_name macromedia-flash
%else
Name: %{base_name}-installer
%endif
-Version: 7.0r25
-Release: 2.17%{?with_license_agreement:wla}
+Version: %{_ver_major}.%{_ver_minor}.%{_ver_patch}
+Release: 4%{?with_license_agreement:wla}
License: Free to use, non-distributable
Group: X11/Applications/Multimedia
%if %{with license_agreement}
-Source0: http://fpdownload.macromedia.com/get/shockwave/flash/english/linux/%{version}/install_flash_player_7_linux.tar.gz
+Source0: http://fpdownload.macromedia.com/get/shockwave/flash/english/linux/%{_ver_major}.%{_ver_minor}r%{_ver_patch}/install_flash_player_%{_ver_major}_linux.tar.gz
# NoSource0-md5: 79c59a5ea29347e01c8e6575dd054cd1
%else
Source0: license-installer.sh
%endif
-URL: http://www.macromedia.com/software/flash/
-BuildRequires: rpmbuild(macros) >= 1.224
-Requires: browser-plugins
+URL: http://www.macromedia.com/software/flashplayer/
+%if %{with license_agreement}
+BuildRequires: rpmbuild(macros) >= 1.236
+%endif
+Requires: browser-plugins(%{_target_cpu})
%if %{without license_agreement}
-Requires: /usr/bin/builder
+Requires: cpio
+Requires: rpm-build-tools
+Requires: wget
%endif
Obsoletes: flash-plugin
Obsoletes: mozilla-plugin-macromedia-flash
%define _plugindir %{_libdir}/browser-plugins
-# TODO: opera, galeon and skipstone.
+# TODO: galeon and skipstone.
# use macro, otherwise extra LF inserted along with the ifarch
-%define browsers mozilla, mozilla-firefox, konqueror
+%define browsers mozilla, mozilla-firefox, konqueror, opera
%description
Flash plugin for Netscape-compatible WWW browsers.
%description -l pl
Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape.
-Supported browsers: %{browsers}.
+Obs³ugiwane przegl±darki: %{browsers}.
%prep
%if %{with license_agreement}
rm -rf $RPM_BUILD_ROOT
%if %{without license_agreement}
-%pre
+%post
%{_bindir}/%{base_name}.install
%else
%triggerin -- mozilla
%nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
-umask 022
-rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
-if [ -x /usr/bin/regxpcom ]; then
- MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
+if [ -d /usr/%{_lib}/mozilla ]; then
+ umask 022
+ rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
+ if [ -x /usr/bin/regxpcom ]; then
+ MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
+ fi
fi
%triggerun -- mozilla
%nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
-umask 022
-rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
-if [ -x /usr/bin/regxpcom ]; then
- MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
+if [ -d /usr/%{_lib}/mozilla ]; then
+ umask 022
+ rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
+ if [ -x /usr/bin/regxpcom ]; then
+ MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
+ fi
fi
%triggerin -- konqueror
%triggerun -- konqueror
%nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
+%triggerin -- opera
+%nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
+
+%triggerun -- opera
+%nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
+
+# as rpm removes the old obsoleted package files after the triggers
+# above are ran, add another trigger to make the links there.
+%triggerpostun -- mozilla-firefox-plugin-macromedia-flash
+%nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
+
+%triggerpostun -- mozilla-plugin-macromedia-flash
+%nsplugin_install -f -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
+
+%triggerpostun -- konqueror-plugin-macromedia-flash
+%nsplugin_install -f -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
%endif
%files