|
|
|
|
%define name flash-player-plugin |
|
|
%define version 10.3.183.10 |
|
|
%define rel 1 |
|
|
|
|
|
# backportability |
|
|
%define _localstatedir /var |
|
|
|
|
|
%ifarch x86_64 |
|
|
# fake 64-bit package that contains 32-bit flash |
|
|
# (to avoid having to have 32-bit nonfree repo on 64-bit) |
|
|
# - Anssi 08/2011 |
|
|
%define _lib lib |
|
|
%define _libdir %{_prefix}/lib |
|
|
%endif |
|
|
|
|
|
%ifarch x86_64 |
|
|
# fake 64-bit package |
|
|
Summary: Flash Player plugin for browsers - 32-bit version |
|
|
%else |
|
1 |
Summary: Flash Player plugin for browsers |
Summary: Flash Player plugin for browsers |
2 |
%endif |
Name: flash-player-plugin |
3 |
Name: %name |
Version: 11.0.1.152 |
4 |
Version: %version |
Release: %mkrel 1 |
|
Release: %mkrel %rel |
|
5 |
License: Proprietary |
License: Proprietary |
6 |
URL: http://www.adobe.com/products/flashplayer/ |
URL: http://www.adobe.com/products/flashplayer/ |
7 |
Group: Networking/WWW |
Group: Networking/WWW |
8 |
ExclusiveArch: %ix86 |
ExclusiveArch: %ix86 x86_64 |
|
# fake 64-bit package: |
|
|
ExclusiveArch: x86_64 |
|
|
|
|
9 |
Requires(pre): curl |
Requires(pre): curl |
10 |
|
|
11 |
# obtained by objdump -x /usr/lib/mozilla/plugins/libflashplayer.so | grep NEEDED |
# obtained by objdump -x /usr/lib/mozilla/plugins/libflashplayer.so | grep NEEDED |
37 |
Conflicts: lightspark-mozilla-plugin |
Conflicts: lightspark-mozilla-plugin |
38 |
Conflicts: libflashsupport < 0.20080000.1 |
Conflicts: libflashsupport < 0.20080000.1 |
39 |
Obsoletes: flash-player-plugin10.2 < 10.2.152 |
Obsoletes: flash-player-plugin10.2 < 10.2.152 |
40 |
|
Provides: flash-player-plugin11 |
41 |
|
Obsoletes: flash-player-plugin11 |
42 |
BuildRequires: kde4-macros |
BuildRequires: kde4-macros |
|
%ifarch x86_64 |
|
|
# fake 64-bit package |
|
|
Suggests: nspluginwrapper |
|
|
%endif |
|
43 |
BuildRoot: %{_tmppath}/%{name}-root |
BuildRoot: %{_tmppath}/%{name}-root |
44 |
|
|
45 |
%description |
%description |
46 |
Adobe Flash Player plugin for browsers. |
Adobe Flash Player plugin for browsers. |
47 |
|
|
48 |
NOTE: This package does not contain the Flash Player itself. The |
NOTE: This package does not contain the Flash Player itself. The |
49 |
software will be automatically downloaded from Adobe during the |
software will be automatically downloaded from Adobe during package |
50 |
package installation. |
installation. |
51 |
|
|
52 |
Installing this package indicates acceptance of the EULA, available |
Installing this package indicates acceptance of the Flash Player EULA, |
53 |
from http://www.adobe.com/products/eulas/players/flash/. |
available at http://www.adobe.com/products/eulas/players/flash/ |
54 |
%ifarch x86_64 |
%ifnarch x86_64 |
55 |
NOTE: This package actually contains the 32-bit version of Flash |
and as %{_libdir}/mozilla/plugins/LICENSE.flashplayer. |
|
Player as 64-bit stable Flash Player is not yet available. |
|
|
|
|
|
This package will be automatically upgraded to the 64-bit version |
|
|
when it becomes available. |
|
56 |
%endif |
%endif |
57 |
|
|
58 |
# It would be preferable to have the KCM module in the main package with |
# It would be preferable to have the KCM module in the main package with |
59 |
# simply not requiring any kde stuff. However, standard KDE installation |
# simply not requiring any kde stuff. However, standard KDE installation |
60 |
# doesn't necessary include libkutils4. - Anssi 08/2011 |
# doesn't necessary include libkutils4. - Anssi 08/2011 |
|
|
|
|
%ifnarch x86_64 |
|
|
# fake 64-bit package |
|
61 |
%package kde |
%package kde |
62 |
Summary: Flash Player KDE settings module |
Summary: Flash Player KDE settings module |
63 |
Group: Networking/WWW |
Group: Networking/WWW |
81 |
Requires: %{_lib}qtsvg4 |
Requires: %{_lib}qtsvg4 |
82 |
Requires: %{_lib}qtgui4 |
Requires: %{_lib}qtgui4 |
83 |
Conflicts: flash-player-plugin < 10.3.183.5 |
Conflicts: flash-player-plugin < 10.3.183.5 |
84 |
Conflicts: flash-player-plugin11 < 11.0.1.98-0.b2.080811.2 |
Provides: flash-player-plugin11-kde |
85 |
|
Obsoletes: flash-player-plugin11-kde |
86 |
|
|
87 |
%description kde |
%description kde |
88 |
KDE settings module for Adobe Flash Player. |
KDE settings module for Adobe Flash Player. |
89 |
|
|
90 |
NOTE: This package does not contain the software itself. The |
NOTE: This package does not contain the software itself. The |
91 |
software will be automatically downloaded from the Adobe server |
software will be automatically downloaded from the Adobe server |
92 |
during the package installation. |
during package installation. |
|
|
|
|
Installing this package indicates acceptance of the EULA, available |
|
|
from http://www.adobe.com/products/eulas/players/flash/. |
|
93 |
|
|
94 |
|
Installing this package indicates acceptance of the Flash Player EULA, |
95 |
|
available at http://www.adobe.com/products/eulas/players/flash/ |
96 |
|
%ifnarch x86_64 |
97 |
|
and as %{_libdir}/mozilla/plugins/LICENSE.flashplayer. |
98 |
%endif |
%endif |
99 |
|
|
100 |
%prep |
%prep |
101 |
%setup -c -T |
%setup -c -T |
102 |
|
|
103 |
|
# Always prefer versioned archives instead of unversioned ones, so that when |
104 |
|
# Adobe updates the Flash Player, the old md5sum continues to work until |
105 |
|
# this package is updated for the new version. |
106 |
|
|
107 |
# The linuxdownload.adobe.com rpm usually stays up longer, but fpdownload.macromedia.com is faster. |
# The linuxdownload.adobe.com rpm usually stays up longer, but fpdownload.macromedia.com is faster. |
108 |
# Their md5sums usually differ. |
# Their md5sums usually differ. |
109 |
#ifarch %ix86 |
|
110 |
# fake 64-bit package |
%ifarch %ix86 |
111 |
%define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%version-release.i386.rpm |
%define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%{version}-release.i386.rpm |
112 |
%define tmd5sum1 4ff0d8dc4a20c5b14a7bc5eb99a2aa5d |
%define tmd5sum1 faedb5c58a3542fa655349fd6a08426d |
113 |
%define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%version-release.i386.rpm |
%define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%{version}-release.i386.rpm |
114 |
%define tmd5sum2 687d7dbeedbabfa30fda760a3bfc7bf4 |
%define tmd5sum2 15a630c6782d3c03bf718f61ae086fbc |
115 |
%define tarname flash-plugin-%version-release.i386.rpm |
%define downurl3 %nil |
116 |
%define tartype rpm |
%define tmd5sum3 %nil |
117 |
#endif |
%define tarname flash-plugin-%{version}-release.i386.rpm |
118 |
|
|
119 |
%if 0 |
%define warn_on_missing_files 1 |
120 |
# fake 64-bit package |
%endif |
121 |
#ifarch x86_64 |
|
122 |
%define downurl1 http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-%version.linux-x86_64.so.tar.gz |
%ifarch x86_64 |
123 |
%define tmd5sum1 none, not available |
# x86_64 rpm misses the GTK and KDE configuration tools (TODO: report at https://bugbase.adobe.com/ ), |
124 |
%define downurl2 %nil |
# so try the tarball first and silently fallback to missing the tools. |
125 |
%define tmd5sum2 %nil |
%define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_11_linux.x86_64.tar.gz |
126 |
%define tarname libflashplayer-%version.linux-x86_64.so.tar.gz |
%define tmd5sum1 782952c5730caa4e4cbe7e1d9dfa6214 |
127 |
%define tartype tar |
%define downurl2 http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%{version}-release.x86_64.rpm |
128 |
|
%define tmd5sum2 cefb13b275ff64a0933ca41fdb76ed18 |
129 |
|
%define downurl3 http://linuxdownload.adobe.com/linux/x86_64/flash-plugin-%{version}-release.x86_64.rpm |
130 |
|
%define tmd5sum3 437d2dae244200037fc75c0cd566ef67 |
131 |
|
%define tarname flash-plugin-%{version}-release.x86_64.rpm |
132 |
|
|
133 |
|
# Tarballs and rpms contain different files with different |
134 |
|
# locations, ignore errors until the tarballs are fixed and we |
135 |
|
# can stop using them (Anssi 10/2011). |
136 |
|
%define warn_on_missing_files 0 |
137 |
%endif |
%endif |
138 |
|
|
139 |
%define file %{_localstatedir}/lib/%{name}/%{tarname} |
%define file %{_localstatedir}/lib/%{name}/%{tarname} |
144 |
install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name} |
install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name} |
145 |
install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins |
install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins |
146 |
touch %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so |
touch %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so |
147 |
touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer |
touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer |
148 |
touch %{buildroot}%{_libdir}/mozilla/plugins/README.flashplayer |
touch %{buildroot}%{_libdir}/mozilla/plugins/README.flashplayer |
149 |
touch %{buildroot}%{_localstatedir}/lib/%{name}/%{tarname} |
touch %{buildroot}%{_localstatedir}/lib/%{name}/%{tarname} |
150 |
|
|
151 |
install -d -m755 %{buildroot}%{_bindir} |
install -d -m755 %{buildroot}%{_bindir} |
152 |
touch %{buildroot}%{_bindir}/flash-player-properties |
touch %{buildroot}%{_bindir}/flash-player-properties |
153 |
|
|
|
%ifnarch x86_64 |
|
|
# fake 64-bit package |
|
154 |
install -d -m755 %{buildroot}%{_kde_services} |
install -d -m755 %{buildroot}%{_kde_services} |
155 |
touch %{buildroot}%{_kde_services}/kcm_adobe_flash_player.desktop |
touch %{buildroot}%{_kde_services}/kcm_adobe_flash_player.desktop |
156 |
install -d -m755 %{buildroot}%{_kde_libdir}/kde4 |
install -d -m755 %{buildroot}%{_kde_libdir}/kde4 |
157 |
touch %{buildroot}%{_kde_libdir}/kde4/kcm_adobe_flash_player.so |
touch %{buildroot}%{_kde_libdir}/kde4/kcm_adobe_flash_player.so |
|
%endif |
|
158 |
|
|
159 |
install -d -m755 %{buildroot}%{_datadir}/applications |
install -d -m755 %{buildroot}%{_datadir}/applications |
160 |
touch %{buildroot}%{_datadir}/applications/flash-player-properties.desktop |
touch %{buildroot}%{_datadir}/applications/flash-player-properties.desktop |
166 |
|
|
167 |
install -d -m755 %{buildroot}%{_datadir}/%{name} |
install -d -m755 %{buildroot}%{_datadir}/%{name} |
168 |
cat > %{buildroot}%{_datadir}/%{name}/functions << EOF |
cat > %{buildroot}%{_datadir}/%{name}/functions << EOF |
169 |
|
next_file() { |
170 |
|
FILENUM=\$((FILENUM+1)) |
171 |
|
eval FILE_SRC="\\\$FILE\${FILENUM}_SRC" |
172 |
|
eval FILE_DST="\\\$FILE\${FILENUM}_DST" |
173 |
|
eval FILE_PRM="\\\$FILE\${FILENUM}_PRM" |
174 |
|
[ -n "\$FILE_SRC" ] |
175 |
|
} |
176 |
|
|
177 |
tar_extract() { |
tar_extract() { |
178 |
extractdir=\$(mktemp -d --tmpdir=/tmp) |
extractdir=\$(mktemp -d --tmpdir=/tmp) |
179 |
if [ -z "\$extractdir" ]; then |
if [ -z "\$extractdir" ]; then |
180 |
echo "Error during extraction." >&2 |
echo "Error during extraction." >&2 |
181 |
exit 1 |
exit 1 |
182 |
fi |
fi |
183 |
|
|
184 |
cd "\$extractdir" || exit 1 |
cd "\$extractdir" || exit 1 |
|
%if "%tartype" == "rpm" |
|
|
rpm2cpio "%file" | cpio -i --quiet -d -R root:root |
|
|
%else |
|
|
tar -xzf "%file" --no-same-owner --no-same-permissions |
|
|
%endif |
|
185 |
|
|
186 |
FILENUM=1 |
if [ "\$(head -c4 "%file")" = \$'\\xED\\xAB\\xEE\\xDB' ]; then |
187 |
FILE_SRC="\$FILE1_SRC" |
rpm2cpio "%file" | cpio -i --quiet -d -R root:root |
188 |
FILE_DST="\$FILE1_DST" |
else |
189 |
FILE_PRM="\$FILE1_PRM" |
tar -xzf "%file" --no-same-owner --no-same-permissions |
190 |
while [ -n "\$FILE_SRC" ]; do |
fi |
191 |
|
|
192 |
|
# Avoid leaving old files in case of failure below |
193 |
|
FILENUM=0 |
194 |
|
while next_file; do |
195 |
|
rm -f "\$FILE_DST" |
196 |
|
done |
197 |
|
|
198 |
|
FILENUM=0 |
199 |
|
while next_file; do |
200 |
|
if [ ! -f "\$FILE_SRC" ]; then |
201 |
|
%if %warn_on_missing_files |
202 |
|
echo "Warning: \$FILE_SRC not found in the Flash Player archive," >&2 |
203 |
|
echo " skipping installation of \$FILE_DST." >&2 |
204 |
|
echo " Please file a bug report at https://bugs.mageia.org/ ." >&2 |
205 |
|
%endif |
206 |
|
continue |
207 |
|
fi |
208 |
|
|
209 |
chmod "\$FILE_PRM" "\$FILE_SRC" |
chmod "\$FILE_PRM" "\$FILE_SRC" |
210 |
mv -f "\$FILE_SRC" "\$FILE_DST" |
mv -f "\$FILE_SRC" "\$FILE_DST" |
|
FILENUM=\$((FILENUM+1)) |
|
|
eval FILE_SRC="\\\$FILE\${FILENUM}_SRC" |
|
|
eval FILE_DST="\\\$FILE\${FILENUM}_DST" |
|
|
eval FILE_PRM="\\\$FILE\${FILENUM}_PRM" |
|
211 |
done |
done |
212 |
rm -rf "\$extractdir" |
rm -rf "\$extractdir" |
213 |
} |
} |
232 |
} |
} |
233 |
MD5SUM1="%{tmd5sum1}" |
MD5SUM1="%{tmd5sum1}" |
234 |
MD5SUM2="%{tmd5sum2}" |
MD5SUM2="%{tmd5sum2}" |
235 |
MD5SUM3= |
MD5SUM3="%{tmd5sum3}" |
236 |
|
MD5SUM4= |
237 |
URL1="%{downurl1}" |
URL1="%{downurl1}" |
238 |
URL2="%{downurl2}" |
URL2="%{downurl2}" |
239 |
URL3= |
URL3="%{downurl3}" |
240 |
|
URL4= |
241 |
|
|
242 |
URLNUM=1 |
URLNUM=1 |
243 |
|
|
244 |
install -d -m 0755 %{_localstatedir}/lib/%{name} |
install -d -m 0755 %{_localstatedir}/lib/%{name} |
245 |
|
|
246 |
echo "Note that by downloading the Adobe Flash Player you indicate your acceptance of" |
echo "Note that by downloading the Adobe Flash Player you indicate your acceptance of" |
247 |
echo "the EULA, available from http://www.adobe.com/products/eulas/players/flash/" |
echo "the EULA, available at http://www.adobe.com/products/eulas/players/flash/" |
248 |
while ! checkmd5sum "%file"; do |
while ! checkmd5sum "%file"; do |
249 |
eval URL="\$URL$URLNUM" |
eval URL="\$URL$URLNUM" |
250 |
if [ -z "$URL" ]; then |
if [ -z "$URL" ]; then |
264 |
done |
done |
265 |
|
|
266 |
%post |
%post |
267 |
FILE1_SRC="usr/lib/flash-plugin/libflashplayer.so" |
FILE1_SRC="usr/%{_lib}/flash-plugin/libflashplayer.so" |
268 |
FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so" |
FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so" |
269 |
FILE1_PRM="0755" |
FILE1_PRM="0755" |
270 |
FILE2_SRC="usr/lib/flash-plugin/LICENSE" |
FILE2_SRC="usr/%{_lib}/flash-plugin/LICENSE" |
271 |
FILE2_DST="%{_libdir}/mozilla/plugins/LICENSE.flashplayer" |
FILE2_DST="%{_libdir}/mozilla/plugins/LICENSE.flashplayer" |
272 |
FILE2_PRM="0644" |
FILE2_PRM="0644" |
273 |
FILE3_SRC="usr/lib/flash-plugin/README" |
FILE3_SRC="usr/%{_lib}/flash-plugin/README" |
274 |
FILE3_DST="%{_libdir}/mozilla/plugins/README.flashplayer" |
FILE3_DST="%{_libdir}/mozilla/plugins/README.flashplayer" |
275 |
FILE3_PRM="0644" |
FILE3_PRM="0644" |
276 |
|
|
297 |
FILE10_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png" |
FILE10_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png" |
298 |
FILE10_PRM="0644" |
FILE10_PRM="0644" |
299 |
FILE11_SRC= |
FILE11_SRC= |
300 |
|
%ifarch x86_64 |
301 |
|
# Hack: the tarballs contain files in different directories (can be removed |
302 |
|
# once we can stop using the tarballs in favor of rpms again on x86_64) -Anssi 10/2011 |
303 |
|
FILE11_SRC="libflashplayer.so" |
304 |
|
FILE11_DST="$FILE1_DST" |
305 |
|
FILE11_PRM="$FILE1_PRM" |
306 |
|
FILE12_SRC= |
307 |
|
%endif |
308 |
|
|
309 |
. %{_datadir}/%{name}/functions |
. %{_datadir}/%{name}/functions |
310 |
tar_extract |
tar_extract |
311 |
|
|
312 |
# show in KDE as well (in case user doesn't have -kde subpkg |
# show in KDE as well (in case user doesn't have -kde subpkg |
313 |
sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop |
sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || : |
314 |
# otherwise KDE hides it: |
# otherwise KDE hides it: |
315 |
sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop |
sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || : |
316 |
|
|
317 |
echo "Installation successful." |
echo "Adobe Flash Player installation successful." |
318 |
|
|
|
if [ "$(uname -m)" == x86_64 ]; then |
|
|
if ! [ -x %{_bindir}/nspluginwrapper ]; then |
|
|
echo "Install nspluginwrapper if you want to use the plugin with 64bit browsers too." |
|
|
fi |
|
|
fi |
|
319 |
|
|
|
%ifnarch x86_64 |
|
|
# fake 64-bit package |
|
320 |
%post kde |
%post kde |
321 |
FILE1_SRC="usr/lib/kde4/kcm_adobe_flash_player.so" |
FILE1_SRC="usr/%{_lib}/kde4/kcm_adobe_flash_player.so" |
322 |
FILE1_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so" |
FILE1_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so" |
323 |
FILE1_PRM="0755" |
FILE1_PRM="0755" |
324 |
FILE2_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop" |
FILE2_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop" |
325 |
FILE2_DST="%{_kde_services}/kcm_adobe_flash_player.desktop" |
FILE2_DST="%{_kde_services}/kcm_adobe_flash_player.desktop" |
326 |
FILE2_PRM="0644" |
FILE2_PRM="0644" |
327 |
FILE3_SRC= |
FILE3_SRC= |
328 |
|
%ifarch x86_64 |
329 |
|
# Hack: the tarballs contain files in different directories (can be removed |
330 |
|
# once we can stop using the tarballs in favor of rpms again on x86_64) -Anssi 10/2011 |
331 |
|
FILE3_SRC="usr/lib/kde4/kcm_adobe_flash_player.so" |
332 |
|
FILE3_DST="$FILE1_DST" |
333 |
|
FILE3_PRM="$FILE1_PRM" |
334 |
|
FILE4_SRC= |
335 |
|
%endif |
336 |
|
|
337 |
. %{_datadir}/%{name}/functions |
. %{_datadir}/%{name}/functions |
338 |
tar_extract |
tar_extract |
339 |
|
|
340 |
if [ "$(uname -m)" == x86_64 ]; then |
sed -i 's,=personal,=network-and-connectivity,' %{_kde_services}/kcm_adobe_flash_player.desktop 2>/dev/null || : |
|
echo "Note: Adobe Flash Player configurator can only be accessed from the normal Tools" |
|
|
echo "menu instead of KDE System Settings (due to this being a 64bit system)." |
|
|
rm -f %{_kde_services}/kcm_adobe_flash_player.desktop |
|
|
fi |
|
|
%endif |
|
341 |
|
|
342 |
%files |
%files |
343 |
%defattr(-,root,root) |
|
344 |
%dir %{_localstatedir}/lib/%{name} |
%dir %{_localstatedir}/lib/%{name} |
345 |
%ghost %{_localstatedir}/lib/%{name}/%{tarname} |
%ghost %{_localstatedir}/lib/%{name}/%{tarname} |
346 |
%dir %{_datadir}/%{name} |
%dir %{_datadir}/%{name} |
356 |
%ghost %{_datadir}/applications/flash-player-properties.desktop |
%ghost %{_datadir}/applications/flash-player-properties.desktop |
357 |
%ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png |
%ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png |
358 |
|
|
|
%ifnarch x86_64 |
|
|
# fake 64-bit package |
|
359 |
%files kde |
%files kde |
360 |
%defattr(-,root,root) |
%defattr(-,root,root) |
361 |
%ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so |
%ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so |
362 |
%ghost %{_kde_services}/kcm_adobe_flash_player.desktop |
%ghost %{_kde_services}/kcm_adobe_flash_player.desktop |
|
%endif |
|