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

Contents of /updates/1/flash-player-plugin/current/SPECS/flash-player-plugin.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 220482 - (show annotations) (download)
Tue Mar 6 19:55:51 2012 UTC (9 years, 4 months ago) by anssi
File size: 12267 byte(s)
- new version 11.1.102.63
  o fixes CVE-2012-0768, CVE-2012-0769 
    ( http://www.adobe.com/support/security/bulletins/apsb12-05.html )

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

  ViewVC Help
Powered by ViewVC 1.1.28