/[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 151537 - (hide annotations) (download)
Tue Oct 4 15:58:44 2011 UTC (12 years, 6 months ago) by doktor5000
File size: 9959 byte(s)
- new version 11.0 final
- obsolete flash-player-plugin11
- remove fake x86_64 stuff, provide native x86_64 plugin
- remove Require for nspluginwrapper
- remove obsolete empty %defattr and %_localstatedir
1 ennael 89107 Summary: Flash Player plugin for browsers
2 doktor5000 151537 Name: flash-player-plugin
3     Version: 11.0.1.152
4     Release: %mkrel 1
5 ennael 89107 License: Proprietary
6     URL: http://www.adobe.com/products/flashplayer/
7     Group: Networking/WWW
8 anssi 134274 Requires(pre): curl
9 ennael 89107
10     # obtained by objdump -x /usr/lib/mozilla/plugins/libflashplayer.so | grep NEEDED
11     # helper: for i in $(objdump -p libflashplayer.so | grep NEEDED | awk '{ print $2 }'); do
12     # echo -n "$i: "; rpm -qf /usr/lib64/$i; done
13     # libX11.so.6 libXext.so.6 libXt.so.6 libfreetype.so.6
14     Requires: %{_lib}x11_6 %{_lib}xext6 %{_lib}xt6 %{_lib}freetype6
15     # libfontconfig.so.1 libgtk-x11-2.0.so.0, libgdk-x11-2.0.so.0
16     Requires: %{_lib}fontconfig1 %{_lib}gtk+-x11-2.0_0
17     # libatk-1.0.so.0 libgdk_pixbuf-2.0.so.0 libpangocairo-1.0.so.0, libpango-1.0.so.0
18     Requires: %{_lib}atk1.0_0 %{_lib}gdk_pixbuf2.0_0 %{_lib}pango1.0_0
19     # libcairo.so.2 libgobject-2.0.so.0, libgmodule-2.0.so.0, libglib-2.0.so.0
20     Requires: %{_lib}cairo2 %{_lib}glib2.0_0
21     # libnss3.so, libsmime3.so, libssl3.so libplds4.so, libplc4.so, libnspr4.so
22     Requires: %{_lib}nss3 %{_lib}nspr4
23     # required for audio, dlopened:
24     Requires: %{_lib}alsa2
25     # dlopened:
26     Requires: %{_lib}curl4
27     # dlopened, for video acceleration:
28     Suggests: %{_lib}vdpau1
29     #
30     Conflicts: FlashPlayer < 9.0.115.0-5
31     Conflicts: flash-plugin FlashPlayer-plugin flashplayer-plugin
32     # Conflict with free plugins to avoid user confusion as to which one is
33     # actually used:
34     Conflicts: gnash-firefox-plugin
35     Conflicts: swfdec-mozilla
36     Conflicts: lightspark-mozilla-plugin
37     Conflicts: libflashsupport < 0.20080000.1
38 doktor5000 151537 Conflicts: nspluginwrapper
39 ennael 89107 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 doktor5000 151537 Installing this package indicates acceptance of the following documents:
53     - Flash Player 11 License, http://labs.adobe.com/technologies/eula/flashplayer11.html
54     - Adobe.com Terms of Use, http://www.adobe.com/go/labs_term_of_use
55     - Adobe Online Privacy Policy, http://www.adobe.com/go/labs_privacy_policy
56 ennael 89107
57 doktor5000 151537
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 anssi 134330
62 anssi 134274 %package kde
63     Summary: Flash Player KDE settings module
64     Group: Networking/WWW
65     Requires: %{name} = %{version}-%{release}
66     Requires(post): %{name} = %{version}-%{release}
67     # helper: for i in $(objdump -p usr/lib/kde4/kcm_adobe_flash_player.so | grep NEEDED | awk '{ print $2 }'); do
68     # echo -n "$i: "; rpm -qf /usr/lib64/$i; done
69     Requires: %{_lib}kdeui5
70     Requires: %{_lib}sm6
71     Requires: %{_lib}ice6
72     Requires: %{_lib}x11_6
73     Requires: %{_lib}xext6
74     Requires: %{_lib}xft2
75     Requires: %{_lib}xau6
76     Requires: %{_lib}xdmcp6
77     Requires: %{_lib}xpm4
78     Requires: %{_lib}kutils4
79     Requires: %{_lib}kdecore5
80     Requires: %{_lib}qtdbus4
81     Requires: %{_lib}qtcore4
82     Requires: %{_lib}qtsvg4
83     Requires: %{_lib}qtgui4
84     Conflicts: flash-player-plugin < 10.3.183.5
85 doktor5000 151537 Provides: flash-player-plugin11-kde
86     Obsoletes: flash-player-plugin11-kde
87 anssi 134274
88     %description kde
89     KDE settings module for Adobe Flash Player.
90    
91     NOTE: This package does not contain the software itself. The
92     software will be automatically downloaded from the Adobe server
93 doktor5000 151537 during package installation.
94 anssi 134274
95 doktor5000 151537 Installing this package indicates acceptance of the following documents:
96     - Flash Player 11 License, http://labs.adobe.com/technologies/eula/flashplayer11.html
97     - Adobe.com Terms of Use, http://www.adobe.com/go/labs_term_of_use
98     - Adobe Online Privacy Policy, http://www.adobe.com/go/labs_privacy_policy
99 anssi 134274
100 anssi 134330
101 ennael 89107 %prep
102     %setup -c -T
103    
104 doktor5000 151537 %ifarch %ix86
105     %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_11_linux.i386.tar.gz
106     %define tmd5sum1 34051edfcb78e6db14567a6c5f53e161
107     %define downurl2 %nil
108     %define tmd5sum2 %nil
109     %define tarname install_flash_player_11_linux.i386.tar.gz
110     %define tartype tar
111     %endif
112 anssi 134330
113 doktor5000 151537 %ifarch x86_64
114     %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_11_linux.x86_64.tar.gz
115     %define tmd5sum1 782952c5730caa4e4cbe7e1d9dfa6214
116 ennael 89107 %define downurl2 %nil
117     %define tmd5sum2 %nil
118 doktor5000 151537 %define tarname install_flash_player_11_linux.x86_64.tar.gz
119 ennael 89107 %define tartype tar
120     %endif
121    
122 anssi 134274 %define file %{_localstatedir}/lib/%{name}/%{tarname}
123    
124     %install
125     rm -rf %{buildroot}
126    
127     install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name}
128     install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins
129     touch %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so
130     touch %{buildroot}%{_localstatedir}/lib/%{name}/%{tarname}
131    
132     install -d -m755 %{buildroot}%{_bindir}
133     touch %{buildroot}%{_bindir}/flash-player-properties
134    
135     install -d -m755 %{buildroot}%{_kde_services}
136     touch %{buildroot}%{_kde_services}/kcm_adobe_flash_player.desktop
137     install -d -m755 %{buildroot}%{_kde_libdir}/kde4
138     touch %{buildroot}%{_kde_libdir}/kde4/kcm_adobe_flash_player.so
139    
140     install -d -m755 %{buildroot}%{_datadir}/applications
141     touch %{buildroot}%{_datadir}/applications/flash-player-properties.desktop
142    
143     for i in 16 22 24 32 48; do
144     install -d -m755 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps
145     touch %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/flash-player-properties.png
146     done
147    
148     install -d -m755 %{buildroot}%{_datadir}/%{name}
149     cat > %{buildroot}%{_datadir}/%{name}/functions << EOF
150     tar_extract() {
151     extractdir=\$(mktemp -d --tmpdir=/tmp)
152     if [ -z "\$extractdir" ]; then
153     echo "Error during extraction." >&2
154     exit 1
155     fi
156    
157     cd "\$extractdir" || exit 1
158     %if "%tartype" == "rpm"
159 anssi 141931 rpm2cpio "%file" | cpio -i --quiet -d -R root:root
160 anssi 134274 %else
161 anssi 141931 tar -xzf "%file" --no-same-owner --no-same-permissions
162 anssi 134274 %endif
163    
164     FILENUM=1
165     FILE_SRC="\$FILE1_SRC"
166     FILE_DST="\$FILE1_DST"
167 anssi 141931 FILE_PRM="\$FILE1_PRM"
168 anssi 134274 while [ -n "\$FILE_SRC" ]; do
169 anssi 141931 chmod "\$FILE_PRM" "\$FILE_SRC"
170 anssi 134274 mv -f "\$FILE_SRC" "\$FILE_DST"
171     FILENUM=\$((FILENUM+1))
172     eval FILE_SRC="\\\$FILE\${FILENUM}_SRC"
173     eval FILE_DST="\\\$FILE\${FILENUM}_DST"
174 anssi 141931 eval FILE_PRM="\\\$FILE\${FILENUM}_PRM"
175 anssi 134274 done
176     rm -rf "\$extractdir"
177     }
178     EOF
179    
180     %clean
181     rm -rf %{buildroot}
182    
183     %pre
184     checkmd5sum() {
185     [ -e "$1" ] || return 1
186     FILEMD5="$(md5sum $1 | cut -d" " -f1)"
187     [ -n "$FILEMD5" ] || return 1
188     MD5NUM=1
189     eval MD5SUM="\$MD5SUM$MD5NUM"
190     while [ "$MD5SUM" ]; do
191     [ "$MD5SUM" = "$FILEMD5" ] && return 0
192     MD5NUM=$((MD5NUM+1))
193     eval MD5SUM="\$MD5SUM$MD5NUM"
194     done
195     return 1
196     }
197 ennael 89107 MD5SUM1="%{tmd5sum1}"
198     MD5SUM2="%{tmd5sum2}"
199     MD5SUM3=
200     URL1="%{downurl1}"
201     URL2="%{downurl2}"
202     URL3=
203 anssi 134274
204     URLNUM=1
205    
206     install -d -m 0755 %{_localstatedir}/lib/%{name}
207    
208     echo "Note that by downloading the Adobe Flash Player you indicate your acceptance of"
209 doktor5000 151537 echo "the EULA, available from http://labs.adobe.com/technologies/eula/flashplayer11.html"
210 anssi 134274 while ! checkmd5sum "%file"; do
211     eval URL="\$URL$URLNUM"
212     if [ -z "$URL" ]; then
213     echo "Error: Unable to download Flash Player. This is likely due to this package" >&2
214     echo " being too old. Please file a bug report at https://bugs.mageia.org" >&2
215     echo " so that the package gets updated. Thank you." >&2
216     echo "" >&2
217     echo " In the meantime, you can download Flash Player manually from" >&2
218     echo " http://get.adobe.com/flashplayer/" >&2
219 doktor5000 151537
220 anssi 134274 exit 1
221     fi
222     URLNUM=$((URLNUM+1))
223     echo "Downloading from $URL:"
224     curl --connect-timeout 20 -m 10800 -L "$URL" > "%file"
225     done
226    
227     %post
228 doktor5000 151537 FILE1_SRC="libflashplayer.so"
229 ennael 89107 FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so"
230 anssi 141931 FILE1_PRM="0755"
231 doktor5000 151537
232     FILE2_SRC="usr/bin/flash-player-properties"
233     FILE2_DST="%{_bindir}/flash-player-properties"
234     FILE2_PRM="0755"
235     FILE3_SRC="usr/share/applications/flash-player-properties.desktop"
236     FILE3_DST="%{_datadir}/applications/flash-player-properties.desktop"
237 anssi 141931 FILE3_PRM="0644"
238 anssi 98265
239 doktor5000 151537 FILE4_SRC="usr/share/icons/hicolor/16x16/apps/flash-player-properties.png"
240     FILE4_DST="%{_iconsdir}/hicolor/16x16/apps/flash-player-properties.png"
241     FILE4_PRM="0644"
242     FILE5_SRC="usr/share/icons/hicolor/22x22/apps/flash-player-properties.png"
243     FILE5_DST="%{_iconsdir}/hicolor/22x22/apps/flash-player-properties.png"
244 anssi 141931 FILE5_PRM="0644"
245 doktor5000 151537 FILE6_SRC="usr/share/icons/hicolor/24x24/apps/flash-player-properties.png"
246     FILE6_DST="%{_iconsdir}/hicolor/24x24/apps/flash-player-properties.png"
247 anssi 141931 FILE6_PRM="0644"
248 doktor5000 151537 FILE7_SRC="usr/share/icons/hicolor/32x32/apps/flash-player-properties.png"
249     FILE7_DST="%{_iconsdir}/hicolor/32x32/apps/flash-player-properties.png"
250 anssi 141931 FILE7_PRM="0644"
251 doktor5000 151537 FILE8_SRC="usr/share/icons/hicolor/48x48/apps/flash-player-properties.png"
252     FILE8_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png"
253 anssi 141931 FILE8_PRM="0644"
254 anssi 98265
255 doktor5000 151537 FILE9_SRC=
256    
257    
258 anssi 134274 . %{_datadir}/%{name}/functions
259     tar_extract
260 anssi 98265
261 anssi 134274 # show in KDE as well (in case user doesn't have -kde subpkg
262     sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop
263     # otherwise KDE hides it:
264     sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop
265 anssi 98265
266 anssi 134274 echo "Installation successful."
267 ennael 89107
268    
269 anssi 134274 %post kde
270     FILE1_SRC="usr/lib/kde4/kcm_adobe_flash_player.so"
271     FILE1_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so"
272 anssi 141931 FILE1_PRM="0755"
273 anssi 134274 FILE2_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop"
274     FILE2_DST="%{_kde_services}/kcm_adobe_flash_player.desktop"
275 anssi 141931 FILE2_PRM="0644"
276     FILE3_SRC=
277 ennael 89107
278 anssi 134274 . %{_datadir}/%{name}/functions
279     tar_extract
280 ennael 89107
281 doktor5000 151537 sed -i 's,=personal,=network-and-connectivity,' %{_kde_services}/kcm_adobe_flash_player.desktop
282 ennael 89107
283     %files
284 doktor5000 151537
285 ennael 89107 %dir %{_localstatedir}/lib/%{name}
286     %ghost %{_localstatedir}/lib/%{name}/%{tarname}
287 anssi 134274 %dir %{_datadir}/%{name}
288     %{_datadir}/%{name}/functions
289    
290 ennael 89107 %dir %{_libdir}/mozilla
291     %dir %{_libdir}/mozilla/plugins
292     %ghost %{_libdir}/mozilla/plugins/libflashplayer.so
293    
294 anssi 98265 %ghost %{_bindir}/flash-player-properties
295     %ghost %{_datadir}/applications/flash-player-properties.desktop
296     %ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png
297 ennael 89107
298 anssi 134274 %files kde
299     %defattr(-,root,root)
300 anssi 98265 %ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so
301     %ghost %{_kde_services}/kcm_adobe_flash_player.desktop

  ViewVC Help
Powered by ViewVC 1.1.30