/[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 389213 - (hide annotations) (download)
Thu Jan 17 21:29:26 2013 UTC (11 years, 3 months ago) by pterjan
Original Path: obsolete/cauldron/flash-player-plugin/current/SPECS/flash-player-plugin.spec
File size: 13131 byte(s)
Drop 
1 anssi 258412 %ifarch x86_64
2     %define bitmark ()(64bit)
3     %else
4     %define bitmark %nil
5     %endif
6    
7 ennael 89107 Summary: Flash Player plugin for browsers
8 doktor5000 151537 Name: flash-player-plugin
9 anssi 361962 Version: 11.2.202.261
10     Release: %mkrel 1
11 ennael 89107 License: Proprietary
12     URL: http://www.adobe.com/products/flashplayer/
13     Group: Networking/WWW
14 doktor5000 151631 ExclusiveArch: %ix86 x86_64
15 anssi 134274 Requires(pre): curl
16 ennael 89107
17 anssi 258412 # 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 ennael 89107 # required for audio, dlopened:
53 anssi 258412 Requires: libasound.so.2%{bitmark}
54 ennael 89107 # dlopened:
55 anssi 258412 Requires: libcurl.so.4%{bitmark}
56 ennael 89107 # dlopened, for video acceleration:
57 anssi 258412 Suggests: libvdpau.so.1%{bitmark}
58 ennael 89107 #
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 doktor5000 151537 Provides: flash-player-plugin11
69     Obsoletes: flash-player-plugin11
70 anssi 98265 BuildRequires: kde4-macros
71 ennael 89107 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 doktor5000 151537 software will be automatically downloaded from Adobe during package
78     installation.
79 ennael 89107
80 anssi 152188 Installing this package indicates acceptance of the Flash Player EULA,
81 anssi 152244 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 ennael 89107
86 anssi 134274 # 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 anssi 258412 # 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 anssi 134274 Conflicts: flash-player-plugin < 10.3.183.5
116 doktor5000 151537 Provides: flash-player-plugin11-kde
117     Obsoletes: flash-player-plugin11-kde
118 anssi 134274
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 doktor5000 151537 during package installation.
125 anssi 134274
126 anssi 152188 Installing this package indicates acceptance of the Flash Player EULA,
127 anssi 152244 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 anssi 134274
132 ennael 89107 %prep
133     %setup -c -T
134    
135 anssi 152244 # 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 doktor5000 151631 # The linuxdownload.adobe.com rpm usually stays up longer, but fpdownload.macromedia.com is faster.
140     # Their md5sums usually differ.
141    
142 doktor5000 151537 %ifarch %ix86
143 anssi 166427 %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/pdc/%{version}/flash-plugin-%{version}-release.i386.rpm
144 anssi 361962 %define tmd5sum1 9e78a36f26a071b9d92581e5245a741c
145 anssi 258416 %define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%{version}-release.i386.rpm
146 anssi 361962 %define tmd5sum2 470eb4cf5384dd2d9bde4d454acc8084
147 anssi 152244 %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 doktor5000 151537 %endif
153 anssi 134330
154 doktor5000 151537 %ifarch x86_64
155 anssi 166427 %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/pdc/%{version}/flash-plugin-%{version}-release.x86_64.rpm
156 anssi 361962 %define tmd5sum1 0a01991d6236908d30e771ce6daf4b88
157 anssi 258416 %define downurl2 http://linuxdownload.adobe.com/linux/x86_64/flash-plugin-%{version}-release.x86_64.rpm
158 anssi 361962 %define tmd5sum2 9b8b9a21a4a3424b43709e69cac1412b
159 anssi 166427 %define downurl3 %nil
160     %define downurl3 %nil
161 anssi 152244 %define tarname flash-plugin-%{version}-release.x86_64.rpm
162    
163 anssi 166427 %define warn_on_missing_files 1
164 ennael 89107 %endif
165    
166 anssi 134274 %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 doktor5000 151631 touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer
175     touch %{buildroot}%{_libdir}/mozilla/plugins/README.flashplayer
176 anssi 134274 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 anssi 152244 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 anssi 134274 tar_extract() {
205 doktor5000 151631 extractdir=\$(mktemp -d --tmpdir=/tmp)
206 anssi 134274 if [ -z "\$extractdir" ]; then
207     echo "Error during extraction." >&2
208     exit 1
209     fi
210    
211     cd "\$extractdir" || exit 1
212 anssi 152244
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 anssi 134274 %endif
233 anssi 152244 continue
234     fi
235    
236 anssi 141931 chmod "\$FILE_PRM" "\$FILE_SRC"
237 anssi 134274 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 anssi 182382
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 ennael 89107 MD5SUM1="%{tmd5sum1}"
275     MD5SUM2="%{tmd5sum2}"
276 anssi 152244 MD5SUM3="%{tmd5sum3}"
277     MD5SUM4=
278 ennael 89107 URL1="%{downurl1}"
279     URL2="%{downurl2}"
280 anssi 152244 URL3="%{downurl3}"
281     URL4=
282 anssi 134274
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 anssi 152188 echo "the EULA, available at http://www.adobe.com/products/eulas/players/flash/"
289 anssi 134274 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 doktor5000 151631 rm -f "%file"
299     [ "$(ls -A "%{_localstatedir}/lib/%{name}")" ] && rm -rf "%{_localstatedir}/lib/%{name}"
300 anssi 134274 exit 1
301     fi
302     URLNUM=$((URLNUM+1))
303     echo "Downloading from $URL:"
304 anssi 182382 curl --connect-timeout 20 -m 10800 -L $(get_proxy_from_urpmi) "$URL" > "%file"
305 anssi 134274 done
306    
307     %post
308 doktor5000 151631 FILE1_SRC="usr/%{_lib}/flash-plugin/libflashplayer.so"
309 ennael 89107 FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so"
310 anssi 141931 FILE1_PRM="0755"
311 anssi 152188 FILE2_SRC="usr/%{_lib}/flash-plugin/LICENSE"
312 doktor5000 151631 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 anssi 141931 FILE3_PRM="0644"
317 anssi 98265
318 anssi 152188 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 anssi 98265
325 anssi 152188 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 anssi 134274 . %{_datadir}/%{name}/functions
343     tar_extract
344 anssi 98265
345 anssi 134274 # show in KDE as well (in case user doesn't have -kde subpkg
346 anssi 152244 sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
347 anssi 134274 # otherwise KDE hides it:
348 anssi 152244 sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop 2>/dev/null || :
349 anssi 98265
350 anssi 152188 echo "Adobe Flash Player installation successful."
351 ennael 89107
352 anssi 166421 %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 ennael 89107
359 anssi 134274 %post kde
360 doktor5000 151631 FILE1_SRC="usr/%{_lib}/kde4/kcm_adobe_flash_player.so"
361 anssi 134274 FILE1_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so"
362 anssi 141931 FILE1_PRM="0755"
363 anssi 134274 FILE2_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop"
364     FILE2_DST="%{_kde_services}/kcm_adobe_flash_player.desktop"
365 anssi 141931 FILE2_PRM="0644"
366     FILE3_SRC=
367 ennael 89107
368 anssi 134274 . %{_datadir}/%{name}/functions
369     tar_extract
370 ennael 89107
371 anssi 152244 sed -i 's,=personal,=network-and-connectivity,' %{_kde_services}/kcm_adobe_flash_player.desktop 2>/dev/null || :
372 ennael 89107
373     %files
374 doktor5000 151537
375 ennael 89107 %dir %{_localstatedir}/lib/%{name}
376     %ghost %{_localstatedir}/lib/%{name}/%{tarname}
377 anssi 134274 %dir %{_datadir}/%{name}
378     %{_datadir}/%{name}/functions
379    
380 ennael 89107 %dir %{_libdir}/mozilla
381     %dir %{_libdir}/mozilla/plugins
382     %ghost %{_libdir}/mozilla/plugins/libflashplayer.so
383 doktor5000 151631 %ghost %{_libdir}/mozilla/plugins/LICENSE.flashplayer
384     %ghost %{_libdir}/mozilla/plugins/README.flashplayer
385 ennael 89107
386 anssi 98265 %ghost %{_bindir}/flash-player-properties
387     %ghost %{_datadir}/applications/flash-player-properties.desktop
388     %ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png
389 ennael 89107
390 anssi 134274 %files kde
391     %defattr(-,root,root)
392 anssi 98265 %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