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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 166427 - (hide annotations) (download)
Fri Nov 11 00:17:59 2011 UTC (12 years, 5 months ago) by anssi
File size: 11864 byte(s)
- new version 11.1.102.55
  o fixes overflow and corruption vulnerabilities CVE-2011-2445,
    CVE-2011-2450, CVE-2011-2451, CVE-2011-2452, CVE-2011-2453,
    CVE-2011-2454, CVE-2011-2455, CVE-2011-2456, CVE-2011-2457,
    CVE-2011-2459, CVE-2011-2460
- normal download used again for x86_64, upstream issue regarding
  missing files was fixed

1 ennael 89107 Summary: Flash Player plugin for browsers
2 doktor5000 151537 Name: flash-player-plugin
3 anssi 166427 Version: 11.1.102.55
4 doktor5000 151537 Release: %mkrel 1
5 ennael 89107 License: Proprietary
6     URL: http://www.adobe.com/products/flashplayer/
7     Group: Networking/WWW
8 doktor5000 151631 ExclusiveArch: %ix86 x86_64
9 anssi 134274 Requires(pre): curl
10 ennael 89107
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 doktor5000 151537 Provides: flash-player-plugin11
41     Obsoletes: flash-player-plugin11
42 anssi 98265 BuildRequires: kde4-macros
43 ennael 89107 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 doktor5000 151537 software will be automatically downloaded from Adobe during package
50     installation.
51 ennael 89107
52 anssi 152188 Installing this package indicates acceptance of the Flash Player EULA,
53 anssi 152244 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 ennael 89107
58 anssi 134274 # 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 doktor5000 151537 Provides: flash-player-plugin11-kde
85     Obsoletes: flash-player-plugin11-kde
86 anssi 134274
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 doktor5000 151537 during package installation.
93 anssi 134274
94 anssi 152188 Installing this package indicates acceptance of the Flash Player EULA,
95 anssi 152244 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 anssi 134274
100 ennael 89107 %prep
101     %setup -c -T
102    
103 anssi 152244 # 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 doktor5000 151631 # The linuxdownload.adobe.com rpm usually stays up longer, but fpdownload.macromedia.com is faster.
108     # Their md5sums usually differ.
109    
110 doktor5000 151537 %ifarch %ix86
111 anssi 166427 %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/pdc/%{version}/flash-plugin-%{version}-release.i386.rpm
112     %define tmd5sum1 32a639c39ca582255038969e6ab4b65e
113 anssi 152244 %define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%{version}-release.i386.rpm
114 anssi 166427 %define tmd5sum2 9d7bff45560e05904e6535af79280e6d
115 anssi 152244 %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 doktor5000 151537 %endif
121 anssi 134330
122 doktor5000 151537 %ifarch x86_64
123 anssi 166427 %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/pdc/%{version}/flash-plugin-%{version}-release.x86_64.rpm
124     %define tmd5sum1 1912a07e5fb61763002a311566b13766
125     %define downurl2 http://linuxdownload.adobe.com/linux/x86_64/flash-plugin-%{version}-release.x86_64.rpm
126     %define tmd5sum2 1acc6bfae4f19a23065f9f77c303d1c7
127     %define downurl3 %nil
128     %define downurl3 %nil
129 anssi 152244 %define tarname flash-plugin-%{version}-release.x86_64.rpm
130    
131 anssi 166427 %define warn_on_missing_files 1
132 ennael 89107 %endif
133    
134 anssi 134274 %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 doktor5000 151631 touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer
143     touch %{buildroot}%{_libdir}/mozilla/plugins/README.flashplayer
144 anssi 134274 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 anssi 152244 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 anssi 134274 tar_extract() {
173 doktor5000 151631 extractdir=\$(mktemp -d --tmpdir=/tmp)
174 anssi 134274 if [ -z "\$extractdir" ]; then
175     echo "Error during extraction." >&2
176     exit 1
177     fi
178    
179     cd "\$extractdir" || exit 1
180 anssi 152244
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 anssi 134274 %endif
201 anssi 152244 continue
202     fi
203    
204 anssi 141931 chmod "\$FILE_PRM" "\$FILE_SRC"
205 anssi 134274 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 ennael 89107 MD5SUM1="%{tmd5sum1}"
229     MD5SUM2="%{tmd5sum2}"
230 anssi 152244 MD5SUM3="%{tmd5sum3}"
231     MD5SUM4=
232 ennael 89107 URL1="%{downurl1}"
233     URL2="%{downurl2}"
234 anssi 152244 URL3="%{downurl3}"
235     URL4=
236 anssi 134274
237     URLNUM=1
238    
239     install -d -m 0755 %{_localstatedir}/lib/%{name}
240    
241     echo "Note that by downloading the Adobe Flash Player you indicate your acceptance of"
242 anssi 152188 echo "the EULA, available at http://www.adobe.com/products/eulas/players/flash/"
243 anssi 134274 while ! checkmd5sum "%file"; do
244     eval URL="\$URL$URLNUM"
245     if [ -z "$URL" ]; then
246     echo "Error: Unable to download Flash Player. This is likely due to this package" >&2
247     echo " being too old. Please file a bug report at https://bugs.mageia.org" >&2
248     echo " so that the package gets updated. Thank you." >&2
249     echo "" >&2
250     echo " In the meantime, you can download Flash Player manually from" >&2
251     echo " http://get.adobe.com/flashplayer/" >&2
252 doktor5000 151631 rm -f "%file"
253     [ "$(ls -A "%{_localstatedir}/lib/%{name}")" ] && rm -rf "%{_localstatedir}/lib/%{name}"
254 anssi 134274 exit 1
255     fi
256     URLNUM=$((URLNUM+1))
257     echo "Downloading from $URL:"
258     curl --connect-timeout 20 -m 10800 -L "$URL" > "%file"
259     done
260    
261     %post
262 doktor5000 151631 FILE1_SRC="usr/%{_lib}/flash-plugin/libflashplayer.so"
263 ennael 89107 FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so"
264 anssi 141931 FILE1_PRM="0755"
265 anssi 152188 FILE2_SRC="usr/%{_lib}/flash-plugin/LICENSE"
266 doktor5000 151631 FILE2_DST="%{_libdir}/mozilla/plugins/LICENSE.flashplayer"
267     FILE2_PRM="0644"
268     FILE3_SRC="usr/%{_lib}/flash-plugin/README"
269     FILE3_DST="%{_libdir}/mozilla/plugins/README.flashplayer"
270 anssi 141931 FILE3_PRM="0644"
271 anssi 98265
272 anssi 152188 FILE4_SRC="usr/bin/flash-player-properties"
273     FILE4_DST="%{_bindir}/flash-player-properties"
274     FILE4_PRM="0755"
275     FILE5_SRC="usr/share/applications/flash-player-properties.desktop"
276     FILE5_DST="%{_datadir}/applications/flash-player-properties.desktop"
277     FILE5_PRM="0644"
278 anssi 98265
279 anssi 152188 FILE6_SRC="usr/share/icons/hicolor/16x16/apps/flash-player-properties.png"
280     FILE6_DST="%{_iconsdir}/hicolor/16x16/apps/flash-player-properties.png"
281     FILE6_PRM="0644"
282     FILE7_SRC="usr/share/icons/hicolor/22x22/apps/flash-player-properties.png"
283     FILE7_DST="%{_iconsdir}/hicolor/22x22/apps/flash-player-properties.png"
284     FILE7_PRM="0644"
285     FILE8_SRC="usr/share/icons/hicolor/24x24/apps/flash-player-properties.png"
286     FILE8_DST="%{_iconsdir}/hicolor/24x24/apps/flash-player-properties.png"
287     FILE8_PRM="0644"
288     FILE9_SRC="usr/share/icons/hicolor/32x32/apps/flash-player-properties.png"
289     FILE9_DST="%{_iconsdir}/hicolor/32x32/apps/flash-player-properties.png"
290     FILE9_PRM="0644"
291     FILE10_SRC="usr/share/icons/hicolor/48x48/apps/flash-player-properties.png"
292     FILE10_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png"
293     FILE10_PRM="0644"
294     FILE11_SRC=
295    
296 anssi 134274 . %{_datadir}/%{name}/functions
297     tar_extract
298 anssi 98265
299 anssi 134274 # show in KDE as well (in case user doesn't have -kde subpkg
300 anssi 152244 sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
301 anssi 134274 # otherwise KDE hides it:
302 anssi 152244 sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
303 anssi 98265
304 anssi 152188 echo "Adobe Flash Player installation successful."
305 ennael 89107
306 anssi 166421 %pre kde
307     # When installing both main package and -kde, failure of %pre of main package
308     # can prevent installation of it, but urpmi/rpm will try to install -kde
309     # regardless. FIXME.
310     # For now, workaround it by preventing -kde installation as well:
311     [ -e %{_datadir}/%{name}/functions ]
312 ennael 89107
313 anssi 134274 %post kde
314 doktor5000 151631 FILE1_SRC="usr/%{_lib}/kde4/kcm_adobe_flash_player.so"
315 anssi 134274 FILE1_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so"
316 anssi 141931 FILE1_PRM="0755"
317 anssi 134274 FILE2_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop"
318     FILE2_DST="%{_kde_services}/kcm_adobe_flash_player.desktop"
319 anssi 141931 FILE2_PRM="0644"
320     FILE3_SRC=
321 ennael 89107
322 anssi 134274 . %{_datadir}/%{name}/functions
323     tar_extract
324 ennael 89107
325 anssi 152244 sed -i 's,=personal,=network-and-connectivity,' %{_kde_services}/kcm_adobe_flash_player.desktop 2>/dev/null || :
326 ennael 89107
327     %files
328 doktor5000 151537
329 ennael 89107 %dir %{_localstatedir}/lib/%{name}
330     %ghost %{_localstatedir}/lib/%{name}/%{tarname}
331 anssi 134274 %dir %{_datadir}/%{name}
332     %{_datadir}/%{name}/functions
333    
334 ennael 89107 %dir %{_libdir}/mozilla
335     %dir %{_libdir}/mozilla/plugins
336     %ghost %{_libdir}/mozilla/plugins/libflashplayer.so
337 doktor5000 151631 %ghost %{_libdir}/mozilla/plugins/LICENSE.flashplayer
338     %ghost %{_libdir}/mozilla/plugins/README.flashplayer
339 ennael 89107
340 anssi 98265 %ghost %{_bindir}/flash-player-properties
341     %ghost %{_datadir}/applications/flash-player-properties.desktop
342     %ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png
343 ennael 89107
344 anssi 134274 %files kde
345     %defattr(-,root,root)
346 anssi 98265 %ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so
347     %ghost %{_kde_services}/kcm_adobe_flash_player.desktop

  ViewVC Help
Powered by ViewVC 1.1.30