/[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 604992 - (hide annotations) (download)
Tue Mar 18 16:34:30 2014 UTC (10 years, 1 month ago) by anssi
File size: 15183 byte(s)
- missing br on dbus-devel for hal-flash (SILENT)
- slight rephrasing of README added in previous commit (SILENT)

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

  ViewVC Help
Powered by ViewVC 1.1.30