/[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 329804 - (show annotations) (download)
Tue Dec 11 19:39:35 2012 UTC (11 years, 3 months ago) by anssi
File size: 13131 byte(s)
- new version 11.2.202.258
  o fixes CVE-2012-5676, CVE-2012-5677, CVE-2012-5678

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.258
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 c7ff5e1756116846fe5bf336f2302c31
145 %define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%{version}-release.i386.rpm
146 %define tmd5sum2 662f1d23c0f1c979845677615598265a
147 %define downurl3 %nil
148 %define tmd5sum3 %nil
149 %define tarname flash-plugin-%{version}-release.i386.rpm
150
151 %define warn_on_missing_files 1
152 %endif
153
154 %ifarch x86_64
155 %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/pdc/%{version}/flash-plugin-%{version}-release.x86_64.rpm
156 %define tmd5sum1 b052a8c5fdcd8d05d2f958d08bd402c1
157 %define downurl2 http://linuxdownload.adobe.com/linux/x86_64/flash-plugin-%{version}-release.x86_64.rpm
158 %define tmd5sum2 9e009527ba4aff1f4ff0bae46678d66e
159 %define downurl3 %nil
160 %define downurl3 %nil
161 %define tarname flash-plugin-%{version}-release.x86_64.rpm
162
163 %define warn_on_missing_files 1
164 %endif
165
166 %define file %{_localstatedir}/lib/%{name}/%{tarname}
167
168 %install
169 rm -rf %{buildroot}
170
171 install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name}
172 install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins
173 touch %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so
174 touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer
175 touch %{buildroot}%{_libdir}/mozilla/plugins/README.flashplayer
176 touch %{buildroot}%{_localstatedir}/lib/%{name}/%{tarname}
177
178 install -d -m755 %{buildroot}%{_bindir}
179 touch %{buildroot}%{_bindir}/flash-player-properties
180
181 install -d -m755 %{buildroot}%{_kde_services}
182 touch %{buildroot}%{_kde_services}/kcm_adobe_flash_player.desktop
183 install -d -m755 %{buildroot}%{_kde_libdir}/kde4
184 touch %{buildroot}%{_kde_libdir}/kde4/kcm_adobe_flash_player.so
185
186 install -d -m755 %{buildroot}%{_datadir}/applications
187 touch %{buildroot}%{_datadir}/applications/flash-player-properties.desktop
188
189 for i in 16 22 24 32 48; do
190 install -d -m755 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps
191 touch %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/flash-player-properties.png
192 done
193
194 install -d -m755 %{buildroot}%{_datadir}/%{name}
195 cat > %{buildroot}%{_datadir}/%{name}/functions << EOF
196 next_file() {
197 FILENUM=\$((FILENUM+1))
198 eval FILE_SRC="\\\$FILE\${FILENUM}_SRC"
199 eval FILE_DST="\\\$FILE\${FILENUM}_DST"
200 eval FILE_PRM="\\\$FILE\${FILENUM}_PRM"
201 [ -n "\$FILE_SRC" ]
202 }
203
204 tar_extract() {
205 extractdir=\$(mktemp -d --tmpdir=/tmp)
206 if [ -z "\$extractdir" ]; then
207 echo "Error during extraction." >&2
208 exit 1
209 fi
210
211 cd "\$extractdir" || exit 1
212
213 if [ "\$(head -c4 "%file")" = \$'\\xED\\xAB\\xEE\\xDB' ]; then
214 rpm2cpio "%file" | cpio -i --quiet -d -R root:root
215 else
216 tar -xzf "%file" --no-same-owner --no-same-permissions
217 fi
218
219 # Avoid leaving old files in case of failure below
220 FILENUM=0
221 while next_file; do
222 rm -f "\$FILE_DST"
223 done
224
225 FILENUM=0
226 while next_file; do
227 if [ ! -f "\$FILE_SRC" ]; then
228 %if %warn_on_missing_files
229 echo "Warning: \$FILE_SRC not found in the Flash Player archive," >&2
230 echo " skipping installation of \$FILE_DST." >&2
231 echo " Please file a bug report at https://bugs.mageia.org/ ." >&2
232 %endif
233 continue
234 fi
235
236 chmod "\$FILE_PRM" "\$FILE_SRC"
237 mv -f "\$FILE_SRC" "\$FILE_DST"
238 done
239 rm -rf "\$extractdir"
240 }
241 EOF
242
243 %clean
244 rm -rf %{buildroot}
245
246 %pre
247 checkmd5sum() {
248 [ -e "$1" ] || return 1
249 FILEMD5="$(md5sum $1 | cut -d" " -f1)"
250 [ -n "$FILEMD5" ] || return 1
251 MD5NUM=1
252 eval MD5SUM="\$MD5SUM$MD5NUM"
253 while [ "$MD5SUM" ]; do
254 [ "$MD5SUM" = "$FILEMD5" ] && return 0
255 MD5NUM=$((MD5NUM+1))
256 eval MD5SUM="\$MD5SUM$MD5NUM"
257 done
258 return 1
259 }
260
261 get_proxy_from_urpmi() {
262 if [ -e /etc/urpmi/proxy.cfg ]; then
263 proxy="$(grep ^http_proxy= /etc/urpmi/proxy.cfg 2>/dev/null)"
264 proxy_user="$(grep ^proxy_user= /etc/urpmi/proxy.cfg 2>/dev/null)"
265
266 proxy="${proxy#http_proxy=}"
267 proxy_user="${proxy_user#proxy_user=}"
268
269 [ -n "$proxy" ] && echo "--proxy $proxy"
270 [ -n "$proxy_user" ] && echo "--proxy-user $proxy_user"
271 fi
272 }
273
274 MD5SUM1="%{tmd5sum1}"
275 MD5SUM2="%{tmd5sum2}"
276 MD5SUM3="%{tmd5sum3}"
277 MD5SUM4=
278 URL1="%{downurl1}"
279 URL2="%{downurl2}"
280 URL3="%{downurl3}"
281 URL4=
282
283 URLNUM=1
284
285 install -d -m 0755 %{_localstatedir}/lib/%{name}
286
287 echo "Note that by downloading the Adobe Flash Player you indicate your acceptance of"
288 echo "the EULA, available at http://www.adobe.com/products/eulas/players/flash/"
289 while ! checkmd5sum "%file"; do
290 eval URL="\$URL$URLNUM"
291 if [ -z "$URL" ]; then
292 echo "Error: Unable to download Flash Player. This is likely due to this package" >&2
293 echo " being too old. Please file a bug report at https://bugs.mageia.org" >&2
294 echo " so that the package gets updated. Thank you." >&2
295 echo "" >&2
296 echo " In the meantime, you can download Flash Player manually from" >&2
297 echo " http://get.adobe.com/flashplayer/" >&2
298 rm -f "%file"
299 [ "$(ls -A "%{_localstatedir}/lib/%{name}")" ] && rm -rf "%{_localstatedir}/lib/%{name}"
300 exit 1
301 fi
302 URLNUM=$((URLNUM+1))
303 echo "Downloading from $URL:"
304 curl --connect-timeout 20 -m 10800 -L $(get_proxy_from_urpmi) "$URL" > "%file"
305 done
306
307 %post
308 FILE1_SRC="usr/%{_lib}/flash-plugin/libflashplayer.so"
309 FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so"
310 FILE1_PRM="0755"
311 FILE2_SRC="usr/%{_lib}/flash-plugin/LICENSE"
312 FILE2_DST="%{_libdir}/mozilla/plugins/LICENSE.flashplayer"
313 FILE2_PRM="0644"
314 FILE3_SRC="usr/%{_lib}/flash-plugin/README"
315 FILE3_DST="%{_libdir}/mozilla/plugins/README.flashplayer"
316 FILE3_PRM="0644"
317
318 FILE4_SRC="usr/bin/flash-player-properties"
319 FILE4_DST="%{_bindir}/flash-player-properties"
320 FILE4_PRM="0755"
321 FILE5_SRC="usr/share/applications/flash-player-properties.desktop"
322 FILE5_DST="%{_datadir}/applications/flash-player-properties.desktop"
323 FILE5_PRM="0644"
324
325 FILE6_SRC="usr/share/icons/hicolor/16x16/apps/flash-player-properties.png"
326 FILE6_DST="%{_iconsdir}/hicolor/16x16/apps/flash-player-properties.png"
327 FILE6_PRM="0644"
328 FILE7_SRC="usr/share/icons/hicolor/22x22/apps/flash-player-properties.png"
329 FILE7_DST="%{_iconsdir}/hicolor/22x22/apps/flash-player-properties.png"
330 FILE7_PRM="0644"
331 FILE8_SRC="usr/share/icons/hicolor/24x24/apps/flash-player-properties.png"
332 FILE8_DST="%{_iconsdir}/hicolor/24x24/apps/flash-player-properties.png"
333 FILE8_PRM="0644"
334 FILE9_SRC="usr/share/icons/hicolor/32x32/apps/flash-player-properties.png"
335 FILE9_DST="%{_iconsdir}/hicolor/32x32/apps/flash-player-properties.png"
336 FILE9_PRM="0644"
337 FILE10_SRC="usr/share/icons/hicolor/48x48/apps/flash-player-properties.png"
338 FILE10_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png"
339 FILE10_PRM="0644"
340 FILE11_SRC=
341
342 . %{_datadir}/%{name}/functions
343 tar_extract
344
345 # show in KDE as well (in case user doesn't have -kde subpkg
346 sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
347 # otherwise KDE hides it:
348 sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
349
350 echo "Adobe Flash Player installation successful."
351
352 %pre kde
353 # When installing both main package and -kde, failure of %pre of main package
354 # can prevent installation of it, but urpmi/rpm will try to install -kde
355 # regardless. FIXME.
356 # For now, workaround it by preventing -kde installation as well:
357 [ -e %{_datadir}/%{name}/functions ]
358
359 %post kde
360 FILE1_SRC="usr/%{_lib}/kde4/kcm_adobe_flash_player.so"
361 FILE1_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so"
362 FILE1_PRM="0755"
363 FILE2_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop"
364 FILE2_DST="%{_kde_services}/kcm_adobe_flash_player.desktop"
365 FILE2_PRM="0644"
366 FILE3_SRC=
367
368 . %{_datadir}/%{name}/functions
369 tar_extract
370
371 sed -i 's,=personal,=network-and-connectivity,' %{_kde_services}/kcm_adobe_flash_player.desktop 2>/dev/null || :
372
373 %files
374
375 %dir %{_localstatedir}/lib/%{name}
376 %ghost %{_localstatedir}/lib/%{name}/%{tarname}
377 %dir %{_datadir}/%{name}
378 %{_datadir}/%{name}/functions
379
380 %dir %{_libdir}/mozilla
381 %dir %{_libdir}/mozilla/plugins
382 %ghost %{_libdir}/mozilla/plugins/libflashplayer.so
383 %ghost %{_libdir}/mozilla/plugins/LICENSE.flashplayer
384 %ghost %{_libdir}/mozilla/plugins/README.flashplayer
385
386 %ghost %{_bindir}/flash-player-properties
387 %ghost %{_datadir}/applications/flash-player-properties.desktop
388 %ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png
389
390 %files kde
391 %defattr(-,root,root)
392 %ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so
393 %ghost %{_kde_services}/kcm_adobe_flash_player.desktop

  ViewVC Help
Powered by ViewVC 1.1.30