/[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 582111 - (show annotations) (download)
Tue Feb 4 20:33:24 2014 UTC (10 years, 2 months ago) by anssi
File size: 13259 byte(s)
- new version 11.2.202.336
  o fixes CVE-2014-0497
    ( http://helpx.adobe.com/security/products/flash-player/apsb14-04.html )

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

  ViewVC Help
Powered by ViewVC 1.1.30