/[packages]/cauldron/flash-player-plugin/current/SPECS/flash-player-plugin.spec
ViewVC logotype

Contents of /cauldron/flash-player-plugin/current/SPECS/flash-player-plugin.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 612933 - (show annotations) (download)
Tue Apr 8 19:42:50 2014 UTC (9 years, 11 months ago) by anssi
File size: 15183 byte(s)
- new version 11.2.202.350
  o fixes CVE-2014-0506, CVE-2014-0507, CVE-2014-0508, CVE-2014-0509

1 %ifarch x86_64
2 %define bitmark ()(64bit)
3 %else
4 %define bitmark %nil
5 %endif
6
7 %define hal_flash_snap 20130530
8 %define flash_libdir %{_libdir}/%{name}
9
10 # Internal dependencies (Anssi 04/2014)
11 %define common_exceptions libflashplayer.so\\|libhal.so\\|lib_plugin.so
12 %define _requires_exceptions %common_exceptions
13 %define _provides_exceptions %common_exceptions
14
15 Summary: Flash Player plugin for browsers
16 Name: flash-player-plugin
17 Version: 11.2.202.350
18 Release: %mkrel 1
19 License: Proprietary
20 URL: http://www.adobe.com/products/flashplayer/
21 Group: Networking/WWW
22 ExclusiveArch: %ix86 x86_64
23 BuildRequires: dbus-devel
24 Requires(pre): curl
25
26 # http://github.com/cshorler/hal-flash
27 Source1: hal-flash-%hal_flash_snap.tar.xz
28
29 # helper for getting requires:
30 # for i in $(objdump -p libflashplayer.so | grep NEEDED | awk '{ print $2 }' | grep -v ld-linux); do echo "Requires: $i%{bitmark}"; done
31 Requires: libatk-1.0.so.0%{bitmark}
32 Requires: libcairo.so.2%{bitmark}
33 Requires: libc.so.6%{bitmark}
34 Requires: libdl.so.2%{bitmark}
35 Requires: libfontconfig.so.1%{bitmark}
36 Requires: libfreetype.so.6%{bitmark}
37 Requires: libgdk_pixbuf-2.0.so.0%{bitmark}
38 Requires: libgdk-x11-2.0.so.0%{bitmark}
39 Requires: libglib-2.0.so.0%{bitmark}
40 Requires: libgmodule-2.0.so.0%{bitmark}
41 Requires: libgobject-2.0.so.0%{bitmark}
42 Requires: libgthread-2.0.so.0%{bitmark}
43 Requires: libgtk-x11-2.0.so.0%{bitmark}
44 Requires: libm.so.6%{bitmark}
45 Requires: libnspr4.so%{bitmark}
46 Requires: libnss3.so%{bitmark}
47 Requires: libnssutil3.so%{bitmark}
48 Requires: libpango-1.0.so.0%{bitmark}
49 Requires: libpangocairo-1.0.so.0%{bitmark}
50 Requires: libpangoft2-1.0.so.0%{bitmark}
51 Requires: libplc4.so%{bitmark}
52 Requires: libplds4.so%{bitmark}
53 Requires: libpthread.so.0%{bitmark}
54 Requires: librt.so.1%{bitmark}
55 Requires: libsmime3.so%{bitmark}
56 Requires: libssl3.so%{bitmark}
57 Requires: libX11.so.6%{bitmark}
58 Requires: libXcursor.so.1%{bitmark}
59 Requires: libXext.so.6%{bitmark}
60 Requires: libXrender.so.1%{bitmark}
61 Requires: libXt.so.6%{bitmark}
62 # end of helper produced requires
63
64 # required for audio, dlopened:
65 Requires: libasound.so.2%{bitmark}
66 # dlopened:
67 Requires: libcurl.so.4%{bitmark}
68 # required for content protection by libadobecp.so
69 Requires: libdbus-1.so.3%{bitmark}
70 # dlopened, for video acceleration:
71 Suggests: libvdpau.so.1%{bitmark}
72 #
73 Conflicts: FlashPlayer < 9.0.115.0-5
74 Conflicts: flash-plugin FlashPlayer-plugin flashplayer-plugin
75 # Conflict with free plugins to avoid user confusion as to which one is
76 # actually used:
77 Conflicts: gnash-firefox-plugin
78 Conflicts: swfdec-mozilla
79 Conflicts: lightspark-mozilla-plugin
80 Conflicts: libflashsupport < 0.20080000.1
81 Obsoletes: flash-player-plugin10.2 < 10.2.152
82 Provides: flash-player-plugin11
83 Obsoletes: flash-player-plugin11
84 BuildRequires: kde4-macros
85 BuildRoot: %{_tmppath}/%{name}-root
86
87 %description
88 Adobe Flash Player plugin for browsers.
89
90 NOTE: This package does not contain the Flash Player itself. The
91 software will be automatically downloaded from Adobe during package
92 installation.
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
99
100 # It would be preferable to have the KCM module in the main package with
101 # simply not requiring any kde stuff. However, standard KDE installation
102 # doesn't necessary include libkutils4. - Anssi 08/2011
103 %package kde
104 Summary: Flash Player KDE settings module
105 Group: Networking/WWW
106 Requires: %{name} = %{version}-%{release}
107 Requires(post): %{name} = %{version}-%{release}
108 # helper for getting requires:
109 # for i in $(objdump -p kcm_adobe_flash_player.so | grep NEEDED | awk '{ print $2 }' | grep -v ld-linux); do echo "Requires: $i%{bitmark}"; done
110 Requires: libc.so.6%{bitmark}
111 Requires: libICE.so.6%{bitmark}
112 Requires: libkdecore.so.5%{bitmark}
113 Requires: libkdeui.so.5%{bitmark}
114 Requires: libkutils.so.4%{bitmark}
115 Requires: libm.so.6%{bitmark}
116 Requires: libpthread.so.0%{bitmark}
117 Requires: libQtCore.so.4%{bitmark}
118 Requires: libQtDBus.so.4%{bitmark}
119 Requires: libQtGui.so.4%{bitmark}
120 Requires: libQtSvg.so.4%{bitmark}
121 Requires: libSM.so.6%{bitmark}
122 Requires: libX11.so.6%{bitmark}
123 Requires: libXau.so.6%{bitmark}
124 Requires: libXdmcp.so.6%{bitmark}
125 Requires: libXext.so.6%{bitmark}
126 Requires: libXft.so.2%{bitmark}
127 Requires: libXpm.so.4%{bitmark}
128 # end of helper produced requires
129 Conflicts: flash-player-plugin < 10.3.183.5
130 Provides: flash-player-plugin11-kde
131 Obsoletes: flash-player-plugin11-kde
132
133 %description kde
134 KDE settings module for Adobe Flash Player.
135
136 NOTE: This package does not contain the software itself. The
137 software will be automatically downloaded from the Adobe server
138 during package installation.
139
140 Installing this package indicates acceptance of the Flash Player EULA,
141 available at http://www.adobe.com/products/eulas/players/flash/
142 %ifnarch x86_64
143 and in %{flash_libdir}/LICENSE.flashplayer.
144 %endif
145
146 %prep
147 %setup -q -c -T -a1
148
149 # Always prefer versioned archives instead of unversioned ones, so that when
150 # Adobe updates the Flash Player, the old md5sum continues to work until
151 # this package is updated for the new version.
152
153 # The linuxdownload.adobe.com rpm usually stays up longer, but fpdownload.macromedia.com is faster.
154 # Their md5sums usually differ.
155
156 %ifarch %ix86
157 %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/pdc/%{version}/flash-plugin-%{version}-release.i386.rpm
158 %define tmd5sum1 f4b30ff4c22a121ac45b5c2a08c60a0e
159 # can be temporarily disabled if not yet available at the time of updating:
160 %define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%{version}-release.i386.rpm
161 %define tmd5sum2 250cb9abc29a8b749131f0bab9209ac4
162 #define downurl2 %nil
163 #define tmd5sum2 %nil
164 %define tarname flash-plugin-%{version}-release.i386.rpm
165
166 %define warn_on_missing_files 1
167 %endif
168
169 %ifarch x86_64
170 %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/pdc/%{version}/flash-plugin-%{version}-release.x86_64.rpm
171 %define tmd5sum1 8e042722bea5d48f137237e882ee6169
172 %define downurl2 http://linuxdownload.adobe.com/linux/x86_64/flash-plugin-%{version}-release.x86_64.rpm
173 %define tmd5sum2 c3fab82b97e85663f7f3a8ef20635fc0
174 #define downurl2 %nil
175 #define dmd5sum2 %nil
176 %define tarname flash-plugin-%{version}-release.x86_64.rpm
177
178 %define warn_on_missing_files 1
179 %endif
180
181 %define file %{_localstatedir}/lib/%{name}/%{tarname}
182
183 cat > README.%_real_vendor <<EOF
184 This package does not contain the Flash Player itself. The software is
185 automatically downloaded from Adobe during package installation.
186
187 This package uses a wrapper in %{_libdir}/mozilla/plugins/libflashplayer.so
188 which loads the real Flash Player from %{flash_libdir}/libflashplayer.so,
189 while also loading the HAL-UDisks wrapper "hal-flash" by Chris Horler
190 (https://github.com/cshorler/hal-flash) which is required to satisfy the
191 HAL dependency of Flash Player for protected content playback.
192 EOF
193 cp -a hal-flash-%hal_flash_snap/COPYING COPYING.hal-flash
194
195 %build
196
197 cd hal-flash-%hal_flash_snap
198 autoreconf -fi
199 %configure2_5x
200 %make
201 cd -
202
203 # we want the dummy dependencies (Anssi 03/2014)
204 %define _disable_ld_as_needed 1
205
206 # Create a wrapper plugin that loads both the real Flash Player and the wrapper libhal.so.1
207 # (Anssi 03/2014)
208 echo | gcc %{optflags} %{ldflags} -Wall -fPIC -shared -o libflashsoname.so -x c - -Wl,-soname,libflashplayer.so
209 echo | gcc %{optflags} %{ldflags} -Wall -fPIC -shared -o libflashwrap.so -x c - -Wl,-soname,lib_plugin.so \
210 -Wl,-rpath,%{flash_libdir} -x none \
211 libflashsoname.so hal-flash-%hal_flash_snap/src/.libs/libhal.so
212
213 %install
214 rm -rf %{buildroot}
215
216 install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name}
217 install -d -m755 %{buildroot}%{flash_libdir}
218 install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins
219
220 install -m755 libflashwrap.so %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so
221 install -m755 hal-flash-%hal_flash_snap/src/.libs/libhal.so.1 %{buildroot}%{flash_libdir}/
222
223 touch %{buildroot}%{flash_libdir}/libflashplayer.so
224 touch %{buildroot}%{flash_libdir}/LICENSE.flashplayer
225 touch %{buildroot}%{flash_libdir}/README.flashplayer
226 touch %{buildroot}%{_localstatedir}/lib/%{name}/%{tarname}
227
228 install -d -m755 %{buildroot}%{_bindir}
229 touch %{buildroot}%{_bindir}/flash-player-properties
230
231 install -d -m755 %{buildroot}%{_kde_services}
232 touch %{buildroot}%{_kde_services}/kcm_adobe_flash_player.desktop
233 install -d -m755 %{buildroot}%{_kde_libdir}/kde4
234 touch %{buildroot}%{_kde_libdir}/kde4/kcm_adobe_flash_player.so
235
236 install -d -m755 %{buildroot}%{_datadir}/applications
237 touch %{buildroot}%{_datadir}/applications/flash-player-properties.desktop
238
239 for i in 16 22 24 32 48; do
240 install -d -m755 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps
241 touch %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/flash-player-properties.png
242 done
243
244 install -d -m755 %{buildroot}%{_datadir}/%{name}
245 cat > %{buildroot}%{_datadir}/%{name}/functions << EOF
246 next_file() {
247 FILENUM=\$((FILENUM+1))
248 eval FILE_SRC="\\\$FILE\${FILENUM}_SRC"
249 eval FILE_DST="\\\$FILE\${FILENUM}_DST"
250 eval FILE_PRM="\\\$FILE\${FILENUM}_PRM"
251 [ -n "\$FILE_SRC" ]
252 }
253
254 tar_extract() {
255 extractdir=\$(mktemp -d --tmpdir=/tmp)
256 if [ -z "\$extractdir" ]; then
257 echo "Error during extraction." >&2
258 exit 1
259 fi
260
261 cd "\$extractdir" || exit 1
262
263 if [ "\$(head -c4 "%file")" = \$'\\xED\\xAB\\xEE\\xDB' ]; then
264 rpm2cpio "%file" | cpio -i --quiet -d -R root:root
265 else
266 tar -xzf "%file" --no-same-owner --no-same-permissions
267 fi
268
269 # Avoid leaving old files in case of failure below
270 FILENUM=0
271 while next_file; do
272 rm -f "\$FILE_DST"
273 done
274
275 FILENUM=0
276 while next_file; do
277 if [ ! -f "\$FILE_SRC" ]; then
278 %if %warn_on_missing_files
279 echo "Warning: \$FILE_SRC not found in the Flash Player archive," >&2
280 echo " skipping installation of \$FILE_DST." >&2
281 echo " Please file a bug report at https://bugs.mageia.org/ ." >&2
282 %endif
283 continue
284 fi
285
286 chmod "\$FILE_PRM" "\$FILE_SRC"
287 mv -f "\$FILE_SRC" "\$FILE_DST"
288 done
289 rm -rf "\$extractdir"
290 }
291 EOF
292
293 %clean
294 rm -rf %{buildroot}
295
296 %pre
297 checkmd5sum() {
298 [ -e "$1" ] || return 1
299 FILEMD5="$(md5sum $1 | cut -d" " -f1)"
300 [ -n "$FILEMD5" ] || return 1
301 MD5NUM=1
302 eval MD5SUM="\$MD5SUM$MD5NUM"
303 while [ "$MD5SUM" ]; do
304 [ "$MD5SUM" = "$FILEMD5" ] && return 0
305 MD5NUM=$((MD5NUM+1))
306 eval MD5SUM="\$MD5SUM$MD5NUM"
307 done
308 return 1
309 }
310
311 get_proxy_from_urpmi() {
312 if [ -e /etc/urpmi/proxy.cfg ]; then
313 proxy="$(grep ^http_proxy= /etc/urpmi/proxy.cfg 2>/dev/null)"
314 proxy_user="$(grep ^proxy_user= /etc/urpmi/proxy.cfg 2>/dev/null)"
315
316 proxy="${proxy#http_proxy=}"
317 proxy_user="${proxy_user#proxy_user=}"
318
319 [ -n "$proxy" ] && echo "--proxy $proxy"
320 [ -n "$proxy_user" ] && echo "--proxy-user $proxy_user"
321 fi
322 }
323
324 MD5SUM1="%{tmd5sum1}"
325 MD5SUM2="%{tmd5sum2}"
326 MD5SUM3="%{tmd5sum3}"
327 MD5SUM4=
328 URL1="%{downurl1}"
329 URL2="%{downurl2}"
330 URL3="%{downurl3}"
331 URL4=
332
333 URLNUM=1
334
335 install -d -m 0755 %{_localstatedir}/lib/%{name}
336
337 echo "Note that by downloading the Adobe Flash Player you indicate your acceptance of"
338 echo "the EULA, available at http://www.adobe.com/products/eulas/players/flash/"
339 while ! checkmd5sum "%file"; do
340 eval URL="\$URL$URLNUM"
341 if [ -z "$URL" ]; then
342 echo "Error: Unable to download Flash Player. This is likely due to this package" >&2
343 echo " being too old. Please file a bug report at https://bugs.mageia.org" >&2
344 echo " so that the package gets updated. Thank you." >&2
345 echo "" >&2
346 echo " In the meantime, you can download Flash Player manually from" >&2
347 echo " http://get.adobe.com/flashplayer/" >&2
348 rm -f "%file"
349 [ "$(ls -A "%{_localstatedir}/lib/%{name}")" ] && rm -rf "%{_localstatedir}/lib/%{name}"
350 exit 1
351 fi
352 URLNUM=$((URLNUM+1))
353 echo "Downloading from $URL:"
354 curl --connect-timeout 20 -m 10800 -L $(get_proxy_from_urpmi) "$URL" > "%file"
355 done
356
357 %post
358 FILE1_SRC="usr/%{_lib}/flash-plugin/libflashplayer.so"
359 FILE1_DST="%{flash_libdir}/libflashplayer.so"
360 FILE1_PRM="0755"
361 FILE2_SRC="usr/%{_lib}/flash-plugin/LICENSE"
362 FILE2_DST="%{flash_libdir}/LICENSE.flashplayer"
363 FILE2_PRM="0644"
364 FILE3_SRC="usr/%{_lib}/flash-plugin/README"
365 FILE3_DST="%{flash_libdir}/README.flashplayer"
366 FILE3_PRM="0644"
367
368 FILE4_SRC="usr/bin/flash-player-properties"
369 FILE4_DST="%{_bindir}/flash-player-properties"
370 FILE4_PRM="0755"
371 FILE5_SRC="usr/share/applications/flash-player-properties.desktop"
372 FILE5_DST="%{_datadir}/applications/flash-player-properties.desktop"
373 FILE5_PRM="0644"
374
375 FILE6_SRC="usr/share/icons/hicolor/16x16/apps/flash-player-properties.png"
376 FILE6_DST="%{_iconsdir}/hicolor/16x16/apps/flash-player-properties.png"
377 FILE6_PRM="0644"
378 FILE7_SRC="usr/share/icons/hicolor/22x22/apps/flash-player-properties.png"
379 FILE7_DST="%{_iconsdir}/hicolor/22x22/apps/flash-player-properties.png"
380 FILE7_PRM="0644"
381 FILE8_SRC="usr/share/icons/hicolor/24x24/apps/flash-player-properties.png"
382 FILE8_DST="%{_iconsdir}/hicolor/24x24/apps/flash-player-properties.png"
383 FILE8_PRM="0644"
384 FILE9_SRC="usr/share/icons/hicolor/32x32/apps/flash-player-properties.png"
385 FILE9_DST="%{_iconsdir}/hicolor/32x32/apps/flash-player-properties.png"
386 FILE9_PRM="0644"
387 FILE10_SRC="usr/share/icons/hicolor/48x48/apps/flash-player-properties.png"
388 FILE10_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png"
389 FILE10_PRM="0644"
390 FILE11_SRC=
391
392 . %{_datadir}/%{name}/functions
393 tar_extract
394
395 # show in KDE as well (in case user doesn't have -kde subpkg
396 sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
397 # otherwise KDE hides it:
398 sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
399
400 echo "Adobe Flash Player installation successful."
401
402 %pre kde
403 # When installing both main package and -kde, failure of %pre of main package
404 # can prevent installation of it, but urpmi/rpm will try to install -kde
405 # regardless. FIXME.
406 # For now, workaround it by preventing -kde installation as well:
407 [ -e %{_datadir}/%{name}/functions ] && [ -e %{_localstatedir}/lib/%{name}/%{tarname} ]
408
409 %post kde
410 FILE1_SRC="usr/%{_lib}/kde4/kcm_adobe_flash_player.so"
411 FILE1_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so"
412 FILE1_PRM="0755"
413 FILE2_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop"
414 FILE2_DST="%{_kde_services}/kcm_adobe_flash_player.desktop"
415 FILE2_PRM="0644"
416 FILE3_SRC=
417
418 . %{_datadir}/%{name}/functions
419 tar_extract
420
421 sed -i 's,=personal,=network-and-connectivity,' %{_kde_services}/kcm_adobe_flash_player.desktop 2>/dev/null || :
422
423 %files
424 %doc README.%_real_vendor
425 %doc COPYING.hal-flash
426
427 %dir %{_localstatedir}/lib/%{name}
428 %ghost %{_localstatedir}/lib/%{name}/%{tarname}
429 %dir %{_datadir}/%{name}
430 %{_datadir}/%{name}/functions
431
432 %dir %{_libdir}/mozilla
433 %dir %{_libdir}/mozilla/plugins
434 %{_libdir}/mozilla/plugins/libflashplayer.so
435 %dir %{flash_libdir}
436 %{flash_libdir}/libhal.so.1
437 %ghost %{flash_libdir}/libflashplayer.so
438 %ghost %{flash_libdir}/LICENSE.flashplayer
439 %ghost %{flash_libdir}/README.flashplayer
440
441 %ghost %{_bindir}/flash-player-properties
442 %ghost %{_datadir}/applications/flash-player-properties.desktop
443 %ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png
444
445 %files kde
446 %defattr(-,root,root)
447 %ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so
448 %ghost %{_kde_services}/kcm_adobe_flash_player.desktop

  ViewVC Help
Powered by ViewVC 1.1.30