1 |
ennael |
89107 |
|
2 |
|
|
%define name flash-player-plugin |
3 |
pterjan |
103346 |
%define version 10.3.181.22 |
4 |
pterjan |
103347 |
%define rel 0 |
5 |
|
|
%define subrel 1 |
6 |
ennael |
89107 |
|
7 |
|
|
# backportability |
8 |
|
|
%define _localstatedir /var |
9 |
|
|
|
10 |
|
|
Summary: Flash Player plugin for browsers |
11 |
|
|
Name: %name |
12 |
|
|
Version: %version |
13 |
|
|
Release: %mkrel %rel |
14 |
|
|
License: Proprietary |
15 |
|
|
URL: http://www.adobe.com/products/flashplayer/ |
16 |
|
|
Source0: download-flash-player-plugin.in |
17 |
|
|
Group: Networking/WWW |
18 |
|
|
ExclusiveArch: %ix86 |
19 |
|
|
Requires: curl |
20 |
|
|
Requires(post): curl |
21 |
|
|
|
22 |
|
|
# obtained by objdump -x /usr/lib/mozilla/plugins/libflashplayer.so | grep NEEDED |
23 |
|
|
# helper: for i in $(objdump -p libflashplayer.so | grep NEEDED | awk '{ print $2 }'); do |
24 |
|
|
# echo -n "$i: "; rpm -qf /usr/lib64/$i; done |
25 |
|
|
# libX11.so.6 libXext.so.6 libXt.so.6 libfreetype.so.6 |
26 |
|
|
Requires: %{_lib}x11_6 %{_lib}xext6 %{_lib}xt6 %{_lib}freetype6 |
27 |
|
|
# libfontconfig.so.1 libgtk-x11-2.0.so.0, libgdk-x11-2.0.so.0 |
28 |
|
|
Requires: %{_lib}fontconfig1 %{_lib}gtk+-x11-2.0_0 |
29 |
|
|
# libatk-1.0.so.0 libgdk_pixbuf-2.0.so.0 libpangocairo-1.0.so.0, libpango-1.0.so.0 |
30 |
|
|
Requires: %{_lib}atk1.0_0 %{_lib}gdk_pixbuf2.0_0 %{_lib}pango1.0_0 |
31 |
|
|
# libcairo.so.2 libgobject-2.0.so.0, libgmodule-2.0.so.0, libglib-2.0.so.0 |
32 |
|
|
Requires: %{_lib}cairo2 %{_lib}glib2.0_0 |
33 |
|
|
# libnss3.so, libsmime3.so, libssl3.so libplds4.so, libplc4.so, libnspr4.so |
34 |
|
|
Requires: %{_lib}nss3 %{_lib}nspr4 |
35 |
|
|
# required for audio, dlopened: |
36 |
|
|
Requires: %{_lib}alsa2 |
37 |
|
|
# dlopened: |
38 |
|
|
Requires: %{_lib}curl4 |
39 |
|
|
# dlopened, for video acceleration: |
40 |
|
|
Suggests: %{_lib}vdpau1 |
41 |
|
|
# |
42 |
|
|
Conflicts: FlashPlayer < 9.0.115.0-5 |
43 |
|
|
Conflicts: flash-plugin FlashPlayer-plugin flashplayer-plugin |
44 |
|
|
# Conflict with free plugins to avoid user confusion as to which one is |
45 |
|
|
# actually used: |
46 |
|
|
Conflicts: gnash-firefox-plugin |
47 |
|
|
Conflicts: swfdec-mozilla |
48 |
|
|
Conflicts: lightspark-mozilla-plugin |
49 |
|
|
Conflicts: libflashsupport < 0.20080000.1 |
50 |
|
|
Obsoletes: flash-player-plugin10.2 < 10.2.152 |
51 |
anssi |
98265 |
BuildRequires: kde4-macros |
52 |
ennael |
89107 |
BuildRoot: %{_tmppath}/%{name}-root |
53 |
|
|
|
54 |
|
|
%description |
55 |
|
|
Adobe Flash Player plugin for browsers. |
56 |
|
|
|
57 |
|
|
NOTE: This package does not contain the Flash Player itself. The |
58 |
|
|
software will be automatically downloaded from Adobe during package |
59 |
|
|
installation. Alternatively you can use the command |
60 |
|
|
"download-flash-player-plugin" manually. |
61 |
|
|
|
62 |
|
|
Installing this package indicates acceptance of the EULA, available |
63 |
|
|
from http://www.adobe.com/products/eulas/players/flash/. |
64 |
|
|
|
65 |
|
|
%prep |
66 |
|
|
%setup -c -T |
67 |
|
|
|
68 |
|
|
# The linuxdownload.adobe.com rpm usually stays up longer, but fpdownload.macromedia.com is faster. |
69 |
|
|
# Their md5sums differ. |
70 |
|
|
%ifarch %ix86 |
71 |
|
|
%define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%version-release.i386.rpm |
72 |
pterjan |
103346 |
%define tmd5sum1 c5db36dcb1a3175f5682189e5ec97c49 |
73 |
ennael |
89107 |
%define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%version-release.i386.rpm |
74 |
pterjan |
103346 |
%define tmd5sum2 aced3a80b2859d0ab845097b7353945b |
75 |
ennael |
89107 |
%define tarname flash-plugin-%version-release.i386.rpm |
76 |
|
|
%define tartype rpm |
77 |
|
|
%endif |
78 |
|
|
%ifarch x86_64 |
79 |
|
|
%define downurl1 http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-%version.linux-x86_64.so.tar.gz |
80 |
|
|
%define tmd5sum1 none, not available |
81 |
|
|
%define downurl2 %nil |
82 |
|
|
%define tmd5sum2 %nil |
83 |
|
|
%define tarname libflashplayer-%version.linux-x86_64.so.tar.gz |
84 |
|
|
%define tartype tar |
85 |
|
|
%endif |
86 |
|
|
|
87 |
|
|
cat > download-flash-player-plugin <<EOF |
88 |
|
|
#!/bin/sh |
89 |
|
|
TARBALLDIR="%{_localstatedir}/lib/%{name}" |
90 |
|
|
FILENAME="%{tarname}" |
91 |
|
|
FILETYPE="%{tartype}" |
92 |
|
|
MD5SUM1="%{tmd5sum1}" |
93 |
|
|
MD5SUM2="%{tmd5sum2}" |
94 |
|
|
MD5SUM3= |
95 |
|
|
URL1="%{downurl1}" |
96 |
|
|
URL2="%{downurl2}" |
97 |
|
|
URL3= |
98 |
anssi |
98265 |
FILE1_SRC="usr/lib/flash-plugin/libflashplayer.so" |
99 |
ennael |
89107 |
FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so" |
100 |
anssi |
98265 |
FILE2_SRC="usr/lib/flash-plugin/LICENSE" |
101 |
ennael |
89107 |
FILE2_DST="%{_libdir}/mozilla/plugins/LICENSE.flashplayer" |
102 |
anssi |
98265 |
FILE3_SRC="usr/lib/flash-plugin/README" |
103 |
|
|
FILE3_DST="%{_libdir}/mozilla/plugins/README.flashplayer" |
104 |
|
|
|
105 |
|
|
FILE4_SRC="usr/bin/flash-player-properties" |
106 |
|
|
FILE4_DST="%{_bindir}/flash-player-properties" |
107 |
|
|
FILE5_SRC="usr/share/applications/flash-player-properties.desktop" |
108 |
|
|
FILE5_DST="%{_datadir}/applications/flash-player-properties.desktop" |
109 |
|
|
|
110 |
|
|
FILE6_SRC="usr/share/icons/hicolor/16x16/apps/flash-player-properties.png" |
111 |
|
|
FILE6_DST="%{_iconsdir}/hicolor/16x16/apps/flash-player-properties.png" |
112 |
|
|
FILE7_SRC="usr/share/icons/hicolor/22x22/apps/flash-player-properties.png" |
113 |
|
|
FILE7_DST="%{_iconsdir}/hicolor/22x22/apps/flash-player-properties.png" |
114 |
|
|
FILE8_SRC="usr/share/icons/hicolor/24x24/apps/flash-player-properties.png" |
115 |
|
|
FILE8_DST="%{_iconsdir}/hicolor/24x24/apps/flash-player-properties.png" |
116 |
|
|
FILE9_SRC="usr/share/icons/hicolor/32x32/apps/flash-player-properties.png" |
117 |
|
|
FILE9_DST="%{_iconsdir}/hicolor/32x32/apps/flash-player-properties.png" |
118 |
|
|
FILE10_SRC="usr/share/icons/hicolor/48x48/apps/flash-player-properties.png" |
119 |
|
|
FILE10_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png" |
120 |
|
|
|
121 |
|
|
FILE11_SRC="usr/lib/kde4/kcm_adobe_flash_player.so" |
122 |
|
|
FILE11_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so" |
123 |
|
|
FILE12_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop" |
124 |
|
|
FILE12_DST="%{_kde_services}/kcm_adobe_flash_player.desktop" |
125 |
|
|
|
126 |
|
|
FILE13_SRC= |
127 |
|
|
|
128 |
ennael |
89107 |
EOF |
129 |
|
|
cat %SOURCE0 >> download-flash-player-plugin |
130 |
|
|
|
131 |
anssi |
98265 |
cat >> download-flash-player-plugin <<EOF |
132 |
|
|
%{_bindir}/gtk-update-icon-cache --force --quiet %{_iconsdir}/hicolor &>/dev/null |
133 |
|
|
EOF |
134 |
|
|
|
135 |
ennael |
89107 |
%ifarch %ix86 |
136 |
|
|
cat >> download-flash-player-plugin <<EOF |
137 |
|
|
if [ "\$(uname -m)" == x86_64 ]; then |
138 |
|
|
if [ -x %{_bindir}/nspluginwrapper ]; then |
139 |
|
|
echo "Detected x86_64 with nspluginwrapper, enabling the plugin on 64bit browsers too." |
140 |
|
|
%{_bindir}/nspluginwrapper -i %{_libdir}/mozilla/plugins/libflashplayer.so |
141 |
|
|
else |
142 |
|
|
echo "Install nspluginwrapper if you want to use the plugin with 64bit browsers too." |
143 |
|
|
fi |
144 |
anssi |
98265 |
echo "Note: Adobe Flash Player configurator can only be accessed from the normal Tools" |
145 |
|
|
echo "menu instead of KDE System Settings (due to this being a 64bit system)." |
146 |
|
|
rm -f %{_kde_services}/kcm_adobe_flash_player.desktop |
147 |
|
|
sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop |
148 |
|
|
# otherwise KDE hides it: |
149 |
|
|
sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop |
150 |
ennael |
89107 |
fi |
151 |
|
|
EOF |
152 |
|
|
%endif |
153 |
|
|
|
154 |
|
|
%install |
155 |
|
|
rm -rf %{buildroot} |
156 |
|
|
|
157 |
|
|
install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name} |
158 |
|
|
install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins |
159 |
|
|
touch %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so |
160 |
|
|
touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer |
161 |
anssi |
98265 |
touch %{buildroot}%{_libdir}/mozilla/plugins/README.flashplayer |
162 |
ennael |
89107 |
touch %{buildroot}%{_localstatedir}/lib/%{name}/%{tarname} |
163 |
|
|
|
164 |
anssi |
98265 |
install -d -m755 %{buildroot}%{_bindir} |
165 |
|
|
touch %{buildroot}%{_bindir}/flash-player-properties |
166 |
|
|
|
167 |
|
|
install -d -m755 %{buildroot}%{_kde_services} |
168 |
|
|
touch %{buildroot}%{_kde_services}/kcm_adobe_flash_player.desktop |
169 |
|
|
install -d -m755 %{buildroot}%{_kde_libdir}/kde4 |
170 |
|
|
touch %{buildroot}%{_kde_libdir}/kde4/kcm_adobe_flash_player.so |
171 |
|
|
|
172 |
|
|
install -d -m755 %{buildroot}%{_datadir}/applications |
173 |
|
|
touch %{buildroot}%{_datadir}/applications/flash-player-properties.desktop |
174 |
|
|
|
175 |
|
|
for i in 16 22 24 32 48; do |
176 |
|
|
install -d -m755 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps |
177 |
|
|
touch %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/flash-player-properties.png |
178 |
|
|
done |
179 |
|
|
|
180 |
ennael |
89107 |
install -d -m755 %{buildroot}%{_sbindir} |
181 |
|
|
install -m755 download-flash-player-plugin %{buildroot}%{_sbindir} |
182 |
|
|
|
183 |
|
|
%clean |
184 |
|
|
rm -rf %{buildroot} |
185 |
|
|
|
186 |
|
|
# posttrans so that we can use postun safely without if's :) |
187 |
|
|
%posttrans |
188 |
|
|
%{_sbindir}/download-flash-player-plugin |
189 |
|
|
|
190 |
|
|
%ifarch %ix86 |
191 |
|
|
%postun |
192 |
|
|
if [ -x %{_bindir}/nspluginwrapper ] && [ "$(uname -m)" == x86_64 ] && [ -f %{_prefix}/lib64/mozilla/plugins/npwrapper.libflashplayer.so ]; then |
193 |
|
|
%{_bindir}/nspluginwrapper -r %{_prefix}/lib64/mozilla/plugins/npwrapper.libflashplayer.so |
194 |
|
|
fi |
195 |
|
|
%endif |
196 |
|
|
|
197 |
|
|
%files |
198 |
|
|
%defattr(-,root,root) |
199 |
|
|
%{_sbindir}/download-flash-player-plugin |
200 |
|
|
%dir %{_localstatedir}/lib/%{name} |
201 |
|
|
%ghost %{_localstatedir}/lib/%{name}/%{tarname} |
202 |
|
|
%dir %{_libdir}/mozilla |
203 |
|
|
%dir %{_libdir}/mozilla/plugins |
204 |
|
|
%ghost %{_libdir}/mozilla/plugins/libflashplayer.so |
205 |
|
|
%ghost %{_libdir}/mozilla/plugins/LICENSE.flashplayer |
206 |
anssi |
98265 |
%ghost %{_libdir}/mozilla/plugins/README.flashplayer |
207 |
ennael |
89107 |
|
208 |
anssi |
98265 |
%ghost %{_bindir}/flash-player-properties |
209 |
|
|
%ghost %{_datadir}/applications/flash-player-properties.desktop |
210 |
|
|
%ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png |
211 |
ennael |
89107 |
|
212 |
anssi |
98265 |
# Prevent unowned directories on non-KDE systems |
213 |
|
|
%dir %{_kde_libdir}/kde4 |
214 |
|
|
%dir %{_datadir}/kde4 |
215 |
|
|
%dir %{_kde_services} |
216 |
|
|
|
217 |
|
|
%ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so |
218 |
|
|
%ghost %{_kde_services}/kcm_adobe_flash_player.desktop |
219 |
|
|
|