/[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 152544 - (show annotations) (download)
Thu Oct 6 20:28:03 2011 UTC (12 years, 5 months ago) by anssi
File size: 12571 byte(s)
update comment for reported upstream bug (SILENT)
1 Summary: Flash Player plugin for browsers
2 Name: flash-player-plugin
3 Version: 11.0.1.152
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/current/flash-plugin-%{version}-release.i386.rpm
112 %define tmd5sum1 faedb5c58a3542fa655349fd6a08426d
113 %define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%{version}-release.i386.rpm
114 %define tmd5sum2 15a630c6782d3c03bf718f61ae086fbc
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 # x86_64 rpm misses the GTK and KDE configuration tools (upstream bug #2994273),
124 # so try the tarball first and silently fallback to missing the tools.
125 %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_11_linux.x86_64.tar.gz
126 %define tmd5sum1 782952c5730caa4e4cbe7e1d9dfa6214
127 %define downurl2 http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%{version}-release.x86_64.rpm
128 %define tmd5sum2 cefb13b275ff64a0933ca41fdb76ed18
129 %define downurl3 http://linuxdownload.adobe.com/linux/x86_64/flash-plugin-%{version}-release.x86_64.rpm
130 %define tmd5sum3 437d2dae244200037fc75c0cd566ef67
131 %define tarname flash-plugin-%{version}-release.x86_64.rpm
132
133 # Tarballs and rpms contain different files with different
134 # locations, ignore errors until the tarballs are fixed and we
135 # can stop using them (Anssi 10/2011).
136 %define warn_on_missing_files 0
137 %endif
138
139 %define file %{_localstatedir}/lib/%{name}/%{tarname}
140
141 %install
142 rm -rf %{buildroot}
143
144 install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name}
145 install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins
146 touch %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so
147 touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer
148 touch %{buildroot}%{_libdir}/mozilla/plugins/README.flashplayer
149 touch %{buildroot}%{_localstatedir}/lib/%{name}/%{tarname}
150
151 install -d -m755 %{buildroot}%{_bindir}
152 touch %{buildroot}%{_bindir}/flash-player-properties
153
154 install -d -m755 %{buildroot}%{_kde_services}
155 touch %{buildroot}%{_kde_services}/kcm_adobe_flash_player.desktop
156 install -d -m755 %{buildroot}%{_kde_libdir}/kde4
157 touch %{buildroot}%{_kde_libdir}/kde4/kcm_adobe_flash_player.so
158
159 install -d -m755 %{buildroot}%{_datadir}/applications
160 touch %{buildroot}%{_datadir}/applications/flash-player-properties.desktop
161
162 for i in 16 22 24 32 48; do
163 install -d -m755 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps
164 touch %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/flash-player-properties.png
165 done
166
167 install -d -m755 %{buildroot}%{_datadir}/%{name}
168 cat > %{buildroot}%{_datadir}/%{name}/functions << EOF
169 next_file() {
170 FILENUM=\$((FILENUM+1))
171 eval FILE_SRC="\\\$FILE\${FILENUM}_SRC"
172 eval FILE_DST="\\\$FILE\${FILENUM}_DST"
173 eval FILE_PRM="\\\$FILE\${FILENUM}_PRM"
174 [ -n "\$FILE_SRC" ]
175 }
176
177 tar_extract() {
178 extractdir=\$(mktemp -d --tmpdir=/tmp)
179 if [ -z "\$extractdir" ]; then
180 echo "Error during extraction." >&2
181 exit 1
182 fi
183
184 cd "\$extractdir" || exit 1
185
186 if [ "\$(head -c4 "%file")" = \$'\\xED\\xAB\\xEE\\xDB' ]; then
187 rpm2cpio "%file" | cpio -i --quiet -d -R root:root
188 else
189 tar -xzf "%file" --no-same-owner --no-same-permissions
190 fi
191
192 # Avoid leaving old files in case of failure below
193 FILENUM=0
194 while next_file; do
195 rm -f "\$FILE_DST"
196 done
197
198 FILENUM=0
199 while next_file; do
200 if [ ! -f "\$FILE_SRC" ]; then
201 %if %warn_on_missing_files
202 echo "Warning: \$FILE_SRC not found in the Flash Player archive," >&2
203 echo " skipping installation of \$FILE_DST." >&2
204 echo " Please file a bug report at https://bugs.mageia.org/ ." >&2
205 %endif
206 continue
207 fi
208
209 chmod "\$FILE_PRM" "\$FILE_SRC"
210 mv -f "\$FILE_SRC" "\$FILE_DST"
211 done
212 rm -rf "\$extractdir"
213 }
214 EOF
215
216 %clean
217 rm -rf %{buildroot}
218
219 %pre
220 checkmd5sum() {
221 [ -e "$1" ] || return 1
222 FILEMD5="$(md5sum $1 | cut -d" " -f1)"
223 [ -n "$FILEMD5" ] || return 1
224 MD5NUM=1
225 eval MD5SUM="\$MD5SUM$MD5NUM"
226 while [ "$MD5SUM" ]; do
227 [ "$MD5SUM" = "$FILEMD5" ] && return 0
228 MD5NUM=$((MD5NUM+1))
229 eval MD5SUM="\$MD5SUM$MD5NUM"
230 done
231 return 1
232 }
233 MD5SUM1="%{tmd5sum1}"
234 MD5SUM2="%{tmd5sum2}"
235 MD5SUM3="%{tmd5sum3}"
236 MD5SUM4=
237 URL1="%{downurl1}"
238 URL2="%{downurl2}"
239 URL3="%{downurl3}"
240 URL4=
241
242 URLNUM=1
243
244 install -d -m 0755 %{_localstatedir}/lib/%{name}
245
246 echo "Note that by downloading the Adobe Flash Player you indicate your acceptance of"
247 echo "the EULA, available at http://www.adobe.com/products/eulas/players/flash/"
248 while ! checkmd5sum "%file"; do
249 eval URL="\$URL$URLNUM"
250 if [ -z "$URL" ]; then
251 echo "Error: Unable to download Flash Player. This is likely due to this package" >&2
252 echo " being too old. Please file a bug report at https://bugs.mageia.org" >&2
253 echo " so that the package gets updated. Thank you." >&2
254 echo "" >&2
255 echo " In the meantime, you can download Flash Player manually from" >&2
256 echo " http://get.adobe.com/flashplayer/" >&2
257 rm -f "%file"
258 [ "$(ls -A "%{_localstatedir}/lib/%{name}")" ] && rm -rf "%{_localstatedir}/lib/%{name}"
259 exit 1
260 fi
261 URLNUM=$((URLNUM+1))
262 echo "Downloading from $URL:"
263 curl --connect-timeout 20 -m 10800 -L "$URL" > "%file"
264 done
265
266 %post
267 FILE1_SRC="usr/%{_lib}/flash-plugin/libflashplayer.so"
268 FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so"
269 FILE1_PRM="0755"
270 FILE2_SRC="usr/%{_lib}/flash-plugin/LICENSE"
271 FILE2_DST="%{_libdir}/mozilla/plugins/LICENSE.flashplayer"
272 FILE2_PRM="0644"
273 FILE3_SRC="usr/%{_lib}/flash-plugin/README"
274 FILE3_DST="%{_libdir}/mozilla/plugins/README.flashplayer"
275 FILE3_PRM="0644"
276
277 FILE4_SRC="usr/bin/flash-player-properties"
278 FILE4_DST="%{_bindir}/flash-player-properties"
279 FILE4_PRM="0755"
280 FILE5_SRC="usr/share/applications/flash-player-properties.desktop"
281 FILE5_DST="%{_datadir}/applications/flash-player-properties.desktop"
282 FILE5_PRM="0644"
283
284 FILE6_SRC="usr/share/icons/hicolor/16x16/apps/flash-player-properties.png"
285 FILE6_DST="%{_iconsdir}/hicolor/16x16/apps/flash-player-properties.png"
286 FILE6_PRM="0644"
287 FILE7_SRC="usr/share/icons/hicolor/22x22/apps/flash-player-properties.png"
288 FILE7_DST="%{_iconsdir}/hicolor/22x22/apps/flash-player-properties.png"
289 FILE7_PRM="0644"
290 FILE8_SRC="usr/share/icons/hicolor/24x24/apps/flash-player-properties.png"
291 FILE8_DST="%{_iconsdir}/hicolor/24x24/apps/flash-player-properties.png"
292 FILE8_PRM="0644"
293 FILE9_SRC="usr/share/icons/hicolor/32x32/apps/flash-player-properties.png"
294 FILE9_DST="%{_iconsdir}/hicolor/32x32/apps/flash-player-properties.png"
295 FILE9_PRM="0644"
296 FILE10_SRC="usr/share/icons/hicolor/48x48/apps/flash-player-properties.png"
297 FILE10_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png"
298 FILE10_PRM="0644"
299 FILE11_SRC=
300 %ifarch x86_64
301 # Hack: the tarballs contain files in different directories (can be removed
302 # once we can stop using the tarballs in favor of rpms again on x86_64) -Anssi 10/2011
303 FILE11_SRC="libflashplayer.so"
304 FILE11_DST="$FILE1_DST"
305 FILE11_PRM="$FILE1_PRM"
306 FILE12_SRC=
307 %endif
308
309 . %{_datadir}/%{name}/functions
310 tar_extract
311
312 # show in KDE as well (in case user doesn't have -kde subpkg
313 sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
314 # otherwise KDE hides it:
315 sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
316
317 echo "Adobe Flash Player installation successful."
318
319
320 %post kde
321 FILE1_SRC="usr/%{_lib}/kde4/kcm_adobe_flash_player.so"
322 FILE1_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so"
323 FILE1_PRM="0755"
324 FILE2_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop"
325 FILE2_DST="%{_kde_services}/kcm_adobe_flash_player.desktop"
326 FILE2_PRM="0644"
327 FILE3_SRC=
328 %ifarch x86_64
329 # Hack: the tarballs contain files in different directories (can be removed
330 # once we can stop using the tarballs in favor of rpms again on x86_64) -Anssi 10/2011
331 FILE3_SRC="usr/lib/kde4/kcm_adobe_flash_player.so"
332 FILE3_DST="$FILE1_DST"
333 FILE3_PRM="$FILE1_PRM"
334 FILE4_SRC=
335 %endif
336
337 . %{_datadir}/%{name}/functions
338 tar_extract
339
340 sed -i 's,=personal,=network-and-connectivity,' %{_kde_services}/kcm_adobe_flash_player.desktop 2>/dev/null || :
341
342 %files
343
344 %dir %{_localstatedir}/lib/%{name}
345 %ghost %{_localstatedir}/lib/%{name}/%{tarname}
346 %dir %{_datadir}/%{name}
347 %{_datadir}/%{name}/functions
348
349 %dir %{_libdir}/mozilla
350 %dir %{_libdir}/mozilla/plugins
351 %ghost %{_libdir}/mozilla/plugins/libflashplayer.so
352 %ghost %{_libdir}/mozilla/plugins/LICENSE.flashplayer
353 %ghost %{_libdir}/mozilla/plugins/README.flashplayer
354
355 %ghost %{_bindir}/flash-player-properties
356 %ghost %{_datadir}/applications/flash-player-properties.desktop
357 %ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png
358
359 %files kde
360 %defattr(-,root,root)
361 %ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so
362 %ghost %{_kde_services}/kcm_adobe_flash_player.desktop

  ViewVC Help
Powered by ViewVC 1.1.30