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/ and as |
54 |
%{_libdir}/mozilla/plugins/LICENSE.flashplayer. |
55 |
|
56 |
# It would be preferable to have the KCM module in the main package with |
57 |
# simply not requiring any kde stuff. However, standard KDE installation |
58 |
# doesn't necessary include libkutils4. - Anssi 08/2011 |
59 |
%package kde |
60 |
Summary: Flash Player KDE settings module |
61 |
Group: Networking/WWW |
62 |
Requires: %{name} = %{version}-%{release} |
63 |
Requires(post): %{name} = %{version}-%{release} |
64 |
# helper: for i in $(objdump -p usr/lib/kde4/kcm_adobe_flash_player.so | grep NEEDED | awk '{ print $2 }'); do |
65 |
# echo -n "$i: "; rpm -qf /usr/lib64/$i; done |
66 |
Requires: %{_lib}kdeui5 |
67 |
Requires: %{_lib}sm6 |
68 |
Requires: %{_lib}ice6 |
69 |
Requires: %{_lib}x11_6 |
70 |
Requires: %{_lib}xext6 |
71 |
Requires: %{_lib}xft2 |
72 |
Requires: %{_lib}xau6 |
73 |
Requires: %{_lib}xdmcp6 |
74 |
Requires: %{_lib}xpm4 |
75 |
Requires: %{_lib}kutils4 |
76 |
Requires: %{_lib}kdecore5 |
77 |
Requires: %{_lib}qtdbus4 |
78 |
Requires: %{_lib}qtcore4 |
79 |
Requires: %{_lib}qtsvg4 |
80 |
Requires: %{_lib}qtgui4 |
81 |
Conflicts: flash-player-plugin < 10.3.183.5 |
82 |
Provides: flash-player-plugin11-kde |
83 |
Obsoletes: flash-player-plugin11-kde |
84 |
|
85 |
%description kde |
86 |
KDE settings module for Adobe Flash Player. |
87 |
|
88 |
NOTE: This package does not contain the software itself. The |
89 |
software will be automatically downloaded from the Adobe server |
90 |
during package installation. |
91 |
|
92 |
Installing this package indicates acceptance of the Flash Player EULA, |
93 |
available at http://www.adobe.com/products/eulas/players/flash/ and as |
94 |
%{_libdir}/mozilla/plugins/LICENSE.flashplayer. |
95 |
|
96 |
%prep |
97 |
%setup -c -T |
98 |
|
99 |
# The linuxdownload.adobe.com rpm usually stays up longer, but fpdownload.macromedia.com is faster. |
100 |
# Their md5sums usually differ. |
101 |
|
102 |
%ifarch %ix86 |
103 |
%define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%{version}-release.i386.rpm |
104 |
%define tmd5sum1 faedb5c58a3542fa655349fd6a08426d |
105 |
%define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%{version}-release.i386.rpm |
106 |
%define tmd5sum2 15a630c6782d3c03bf718f61ae086fbc |
107 |
%define tarname flash-plugin-%{version}-release.i386.rpm |
108 |
%define tartype rpm |
109 |
%endif |
110 |
|
111 |
%ifarch x86_64 |
112 |
%define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%{version}-release.x86_64.rpm |
113 |
%define tmd5sum1 cefb13b275ff64a0933ca41fdb76ed18 |
114 |
%define downurl2 http://linuxdownload.adobe.com/linux/x86_64/flash-plugin-%{version}-release.x86_64.rpm |
115 |
%define tmd5sum2 437d2dae244200037fc75c0cd566ef67 |
116 |
%define tarname flash-plugin-%{version}-release.x86_64.rpm |
117 |
%define tartype rpm |
118 |
%endif |
119 |
|
120 |
%define file %{_localstatedir}/lib/%{name}/%{tarname} |
121 |
|
122 |
%install |
123 |
rm -rf %{buildroot} |
124 |
|
125 |
install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name} |
126 |
install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins |
127 |
touch %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so |
128 |
touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer |
129 |
touch %{buildroot}%{_libdir}/mozilla/plugins/README.flashplayer |
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 |
rpm2cpio "%file" | cpio -i --quiet -d -R root:root |
160 |
%else |
161 |
tar -xzf "%file" --no-same-owner --no-same-permissions |
162 |
%endif |
163 |
|
164 |
FILENUM=1 |
165 |
FILE_SRC="\$FILE1_SRC" |
166 |
FILE_DST="\$FILE1_DST" |
167 |
FILE_PRM="\$FILE1_PRM" |
168 |
while [ -n "\$FILE_SRC" ]; do |
169 |
chmod "\$FILE_PRM" "\$FILE_SRC" |
170 |
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 |
eval FILE_PRM="\\\$FILE\${FILENUM}_PRM" |
175 |
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 |
MD5SUM1="%{tmd5sum1}" |
198 |
MD5SUM2="%{tmd5sum2}" |
199 |
MD5SUM3= |
200 |
URL1="%{downurl1}" |
201 |
URL2="%{downurl2}" |
202 |
URL3= |
203 |
|
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 |
echo "the EULA, available at http://www.adobe.com/products/eulas/players/flash/" |
210 |
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 |
rm -f "%file" |
220 |
[ "$(ls -A "%{_localstatedir}/lib/%{name}")" ] && rm -rf "%{_localstatedir}/lib/%{name}" |
221 |
exit 1 |
222 |
fi |
223 |
URLNUM=$((URLNUM+1)) |
224 |
echo "Downloading from $URL:" |
225 |
curl --connect-timeout 20 -m 10800 -L "$URL" > "%file" |
226 |
done |
227 |
|
228 |
%post |
229 |
FILE1_SRC="usr/%{_lib}/flash-plugin/libflashplayer.so" |
230 |
FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so" |
231 |
FILE1_PRM="0755" |
232 |
FILE2_SRC="usr/%{_lib}/flash-plugin/LICENSE" |
233 |
FILE2_DST="%{_libdir}/mozilla/plugins/LICENSE.flashplayer" |
234 |
FILE2_PRM="0644" |
235 |
FILE3_SRC="usr/%{_lib}/flash-plugin/README" |
236 |
FILE3_DST="%{_libdir}/mozilla/plugins/README.flashplayer" |
237 |
FILE3_PRM="0644" |
238 |
|
239 |
FILE4_SRC="usr/bin/flash-player-properties" |
240 |
FILE4_DST="%{_bindir}/flash-player-properties" |
241 |
FILE4_PRM="0755" |
242 |
FILE5_SRC="usr/share/applications/flash-player-properties.desktop" |
243 |
FILE5_DST="%{_datadir}/applications/flash-player-properties.desktop" |
244 |
FILE5_PRM="0644" |
245 |
|
246 |
FILE6_SRC="usr/share/icons/hicolor/16x16/apps/flash-player-properties.png" |
247 |
FILE6_DST="%{_iconsdir}/hicolor/16x16/apps/flash-player-properties.png" |
248 |
FILE6_PRM="0644" |
249 |
FILE7_SRC="usr/share/icons/hicolor/22x22/apps/flash-player-properties.png" |
250 |
FILE7_DST="%{_iconsdir}/hicolor/22x22/apps/flash-player-properties.png" |
251 |
FILE7_PRM="0644" |
252 |
FILE8_SRC="usr/share/icons/hicolor/24x24/apps/flash-player-properties.png" |
253 |
FILE8_DST="%{_iconsdir}/hicolor/24x24/apps/flash-player-properties.png" |
254 |
FILE8_PRM="0644" |
255 |
FILE9_SRC="usr/share/icons/hicolor/32x32/apps/flash-player-properties.png" |
256 |
FILE9_DST="%{_iconsdir}/hicolor/32x32/apps/flash-player-properties.png" |
257 |
FILE9_PRM="0644" |
258 |
FILE10_SRC="usr/share/icons/hicolor/48x48/apps/flash-player-properties.png" |
259 |
FILE10_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png" |
260 |
FILE10_PRM="0644" |
261 |
FILE11_SRC= |
262 |
|
263 |
. %{_datadir}/%{name}/functions |
264 |
tar_extract |
265 |
|
266 |
# show in KDE as well (in case user doesn't have -kde subpkg |
267 |
sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop |
268 |
# otherwise KDE hides it: |
269 |
sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop |
270 |
|
271 |
echo "Adobe Flash Player installation successful." |
272 |
|
273 |
|
274 |
%post kde |
275 |
FILE1_SRC="usr/%{_lib}/kde4/kcm_adobe_flash_player.so" |
276 |
FILE1_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so" |
277 |
FILE1_PRM="0755" |
278 |
FILE2_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop" |
279 |
FILE2_DST="%{_kde_services}/kcm_adobe_flash_player.desktop" |
280 |
FILE2_PRM="0644" |
281 |
FILE3_SRC= |
282 |
|
283 |
. %{_datadir}/%{name}/functions |
284 |
tar_extract |
285 |
|
286 |
sed -i 's,=personal,=network-and-connectivity,' %{_kde_services}/kcm_adobe_flash_player.desktop |
287 |
|
288 |
%files |
289 |
|
290 |
%dir %{_localstatedir}/lib/%{name} |
291 |
%ghost %{_localstatedir}/lib/%{name}/%{tarname} |
292 |
%dir %{_datadir}/%{name} |
293 |
%{_datadir}/%{name}/functions |
294 |
|
295 |
%dir %{_libdir}/mozilla |
296 |
%dir %{_libdir}/mozilla/plugins |
297 |
%ghost %{_libdir}/mozilla/plugins/libflashplayer.so |
298 |
%ghost %{_libdir}/mozilla/plugins/LICENSE.flashplayer |
299 |
%ghost %{_libdir}/mozilla/plugins/README.flashplayer |
300 |
|
301 |
%ghost %{_bindir}/flash-player-properties |
302 |
%ghost %{_datadir}/applications/flash-player-properties.desktop |
303 |
%ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png |
304 |
|
305 |
%files kde |
306 |
%defattr(-,root,root) |
307 |
%ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so |
308 |
%ghost %{_kde_services}/kcm_adobe_flash_player.desktop |