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.13%{?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 URL: http://www.macromedia.com/software/flash/
22 BuildRequires: rpmbuild(macros) >= 1.224
23 Requires: browser-plugins
24 %if %{without license_agreement}
25 Requires: /usr/bin/builder
27 Obsoletes: flash-plugin
28 Obsoletes: mozilla-plugin-macromedia-flash
29 Obsoletes: mozilla-firefox-plugin-macromedia-flash
30 Obsoletes: konqueror-plugin-macromedia-flash
31 ExclusiveArch: %{ix86}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _plugindir %{_libdir}/browser-plugins
36 # TODO: opera, galeon and skipstone.
37 # use macro, otherwise extra LF inserted along with the ifarch
38 %define browsers mozilla, mozilla-firefox, konqueror
41 Flash plugin for Netscape-compatible WWW browsers.
43 Supported browsers: %{browsers}.
46 Wtyczka Flash dla przeglĀ±darek WWW zgodnych z Netscape.
48 Supported browsers: %{browsers}.
51 %if %{with license_agreement}
52 %setup -q -n install_flash_player_7_linux
56 rm -rf $RPM_BUILD_ROOT
57 %if %{without license_agreement}
58 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
60 cat <<'EOF' >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
62 if [ "$1" = "--with" -a "$2" = "license_agreement" ]; then
63 TMPDIR=`rpm --eval "%%{tmpdir}"`; export TMPDIR
64 SPECDIR=`rpm --eval "%%{_specdir}"`; export SPECDIR
65 SRPMDIR=`rpm --eval "%%{_srcrpmdir}"`; export SRPMDIR
66 SOURCEDIR=`rpm --eval "%%{_sourcedir}"`; export SOURCEDIR
67 BUILDDIR=`rpm --eval "%%{_builddir}"`; export BUILDDIR
68 RPMDIR=`rpm --eval "%%{_rpmdir}"`; export RPMDIR
70 mkdir -p $TMPDIR $SPECDIR $SRPMDIR $RPMDIR $SRPMDIR $SOURCEDIR $BUILDDIR
71 if [ -f $SPECDIR/%{base_name}.spec ]; then
73 mv -f $SPECDIR/%{base_name}.spec $SPECDIR/%{base_name}.spec.prev
75 if echo "$3" | grep '\.src\.rpm$' >/dev/null; then
77 if echo "$3" | grep '://' >/dev/null; then
78 wget --passive-ftp -t0 "$3"
82 rpm2cpio `basename "$3"` | ( cd $TMPDIR; cpio -i %{base_name}.spec )
84 cp -i $TMPDIR/%{base_name}.spec $SPECDIR/%{base_name}.spec || exit 1
86 cp -i "$3" $SPECDIR || exit 1
89 %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
90 if [ "$?" -ne 0 ]; then
93 RPMNAME=%{base_name}-%{version}-%{release}wla.%{_target_cpu}.rpm
94 RPMNAMES="$RPMNAMES $RPMDIR/$RPMNAME"
95 rpm -U $RPMNAMES || echo -e "Install manually the file(s):\n $RPMNAMES" )
96 if [ "$BACKUP" -eq 1 ]; then
97 if [ -f $SPECDIR/%{base_name}.spec.prev ]; then
98 mv -f $SPECDIR/%{base_name}.spec.prev $SPECDIR/%{base_name}.spec
103 License issues made us not to include inherent files into
104 this package by default. If you want to create full working
105 package please build it with the following command:
107 $0 --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
112 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
116 install -d $RPM_BUILD_ROOT%{_plugindir}
117 install *.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
122 rm -rf $RPM_BUILD_ROOT
124 %if %{without license_agreement}
127 License issues made us not to include inherent files into
128 this package by default. If you want to create full working
129 package please build it with the following command:
131 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
135 %triggerin -- mozilla-firefox
136 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
138 %triggerun -- mozilla-firefox
139 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
141 %triggerin -- mozilla
142 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
144 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
145 if [ -x /usr/bin/regxpcom ]; then
146 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
149 %triggerun -- mozilla
150 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
152 rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
153 if [ -x /usr/bin/regxpcom ]; then
154 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
157 %triggerin -- konqueror
158 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
160 %triggerun -- konqueror
161 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
166 %defattr(644,root,root,755)
168 %if %{without license_agreement}
169 %attr(755,root,root) %{_bindir}/%{base_name}.install
170 %{_datadir}/%{base_name}
173 %attr(755,root,root) %{_plugindir}/*.so