1 |
|
2 |
%define name flash-player-plugin |
3 |
%define version 10.2.159.1 |
4 |
%define rel 1 |
5 |
|
6 |
# backportability |
7 |
%define _localstatedir /var |
8 |
|
9 |
Summary: Flash Player plugin for browsers |
10 |
Name: %name |
11 |
Version: %version |
12 |
Release: %mkrel %rel |
13 |
License: Proprietary |
14 |
URL: http://www.adobe.com/products/flashplayer/ |
15 |
Source0: download-flash-player-plugin.in |
16 |
Group: Networking/WWW |
17 |
ExclusiveArch: %ix86 |
18 |
Requires: curl |
19 |
Requires(post): curl |
20 |
|
21 |
# obtained by objdump -x /usr/lib/mozilla/plugins/libflashplayer.so | grep NEEDED |
22 |
# helper: for i in $(objdump -p libflashplayer.so | grep NEEDED | awk '{ print $2 }'); do |
23 |
# echo -n "$i: "; rpm -qf /usr/lib64/$i; done |
24 |
# libX11.so.6 libXext.so.6 libXt.so.6 libfreetype.so.6 |
25 |
Requires: %{_lib}x11_6 %{_lib}xext6 %{_lib}xt6 %{_lib}freetype6 |
26 |
# libfontconfig.so.1 libgtk-x11-2.0.so.0, libgdk-x11-2.0.so.0 |
27 |
Requires: %{_lib}fontconfig1 %{_lib}gtk+-x11-2.0_0 |
28 |
# libatk-1.0.so.0 libgdk_pixbuf-2.0.so.0 libpangocairo-1.0.so.0, libpango-1.0.so.0 |
29 |
Requires: %{_lib}atk1.0_0 %{_lib}gdk_pixbuf2.0_0 %{_lib}pango1.0_0 |
30 |
# libcairo.so.2 libgobject-2.0.so.0, libgmodule-2.0.so.0, libglib-2.0.so.0 |
31 |
Requires: %{_lib}cairo2 %{_lib}glib2.0_0 |
32 |
# libnss3.so, libsmime3.so, libssl3.so libplds4.so, libplc4.so, libnspr4.so |
33 |
Requires: %{_lib}nss3 %{_lib}nspr4 |
34 |
# required for audio, dlopened: |
35 |
Requires: %{_lib}alsa2 |
36 |
# dlopened: |
37 |
Requires: %{_lib}curl4 |
38 |
# dlopened, for video acceleration: |
39 |
Suggests: %{_lib}vdpau1 |
40 |
# |
41 |
Conflicts: FlashPlayer < 9.0.115.0-5 |
42 |
Conflicts: flash-plugin FlashPlayer-plugin flashplayer-plugin |
43 |
# Conflict with free plugins to avoid user confusion as to which one is |
44 |
# actually used: |
45 |
Conflicts: gnash-firefox-plugin |
46 |
Conflicts: swfdec-mozilla |
47 |
Conflicts: lightspark-mozilla-plugin |
48 |
Conflicts: libflashsupport < 0.20080000.1 |
49 |
Obsoletes: flash-player-plugin10.2 < 10.2.152 |
50 |
BuildRoot: %{_tmppath}/%{name}-root |
51 |
|
52 |
%description |
53 |
Adobe Flash Player plugin for browsers. |
54 |
|
55 |
NOTE: This package does not contain the Flash Player itself. The |
56 |
software will be automatically downloaded from Adobe during package |
57 |
installation. Alternatively you can use the command |
58 |
"download-flash-player-plugin" manually. |
59 |
|
60 |
Installing this package indicates acceptance of the EULA, available |
61 |
from http://www.adobe.com/products/eulas/players/flash/. |
62 |
|
63 |
%prep |
64 |
%setup -c -T |
65 |
|
66 |
# The linuxdownload.adobe.com rpm usually stays up longer, but fpdownload.macromedia.com is faster. |
67 |
# Their md5sums differ. |
68 |
%ifarch %ix86 |
69 |
%define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%version-release.i386.rpm |
70 |
%define tmd5sum1 7abf41a13b02d68cf91f19c57eccadc5 |
71 |
%define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%version-release.i386.rpm |
72 |
%define tmd5sum2 827641c30e8b9888a489e830483de2ed |
73 |
%define tarname flash-plugin-%version-release.i386.rpm |
74 |
%define tartype rpm |
75 |
%define srcdir ./usr/lib/flash-plugin/ |
76 |
%endif |
77 |
%ifarch x86_64 |
78 |
%define downurl1 http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-%version.linux-x86_64.so.tar.gz |
79 |
%define tmd5sum1 none, not available |
80 |
%define downurl2 %nil |
81 |
%define tmd5sum2 %nil |
82 |
%define tarname libflashplayer-%version.linux-x86_64.so.tar.gz |
83 |
%define tartype tar |
84 |
%define srcdir %nil |
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 |
FILE1_SRC="%{srcdir}libflashplayer.so" |
99 |
FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so" |
100 |
%ifarch x86_64 |
101 |
# x86_64 tarballs contains binary only |
102 |
# if changed, remember to update filelist as well |
103 |
FILE2_SRC= |
104 |
%else |
105 |
FILE2_SRC="%srcdir/LICENSE" |
106 |
%endif |
107 |
FILE2_DST="%{_libdir}/mozilla/plugins/LICENSE.flashplayer" |
108 |
FILE3_SRC= |
109 |
EOF |
110 |
cat %SOURCE0 >> download-flash-player-plugin |
111 |
|
112 |
%ifarch %ix86 |
113 |
cat >> download-flash-player-plugin <<EOF |
114 |
if [ "\$(uname -m)" == x86_64 ]; then |
115 |
if [ -x %{_bindir}/nspluginwrapper ]; then |
116 |
echo "Detected x86_64 with nspluginwrapper, enabling the plugin on 64bit browsers too." |
117 |
%{_bindir}/nspluginwrapper -i %{_libdir}/mozilla/plugins/libflashplayer.so |
118 |
else |
119 |
echo "Install nspluginwrapper if you want to use the plugin with 64bit browsers too." |
120 |
fi |
121 |
fi |
122 |
EOF |
123 |
%endif |
124 |
|
125 |
%install |
126 |
rm -rf %{buildroot} |
127 |
|
128 |
install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name} |
129 |
install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins |
130 |
touch %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so |
131 |
%ifnarch x86_64 |
132 |
touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer |
133 |
%endif |
134 |
touch %{buildroot}%{_localstatedir}/lib/%{name}/%{tarname} |
135 |
|
136 |
install -d -m755 %{buildroot}%{_sbindir} |
137 |
install -m755 download-flash-player-plugin %{buildroot}%{_sbindir} |
138 |
|
139 |
%clean |
140 |
rm -rf %{buildroot} |
141 |
|
142 |
# posttrans so that we can use postun safely without if's :) |
143 |
%posttrans |
144 |
%{_sbindir}/download-flash-player-plugin |
145 |
|
146 |
%ifarch %ix86 |
147 |
%postun |
148 |
if [ -x %{_bindir}/nspluginwrapper ] && [ "$(uname -m)" == x86_64 ] && [ -f %{_prefix}/lib64/mozilla/plugins/npwrapper.libflashplayer.so ]; then |
149 |
%{_bindir}/nspluginwrapper -r %{_prefix}/lib64/mozilla/plugins/npwrapper.libflashplayer.so |
150 |
fi |
151 |
%endif |
152 |
|
153 |
%files |
154 |
%defattr(-,root,root) |
155 |
%{_sbindir}/download-flash-player-plugin |
156 |
%dir %{_localstatedir}/lib/%{name} |
157 |
%ghost %{_localstatedir}/lib/%{name}/%{tarname} |
158 |
%dir %{_libdir}/mozilla |
159 |
%dir %{_libdir}/mozilla/plugins |
160 |
%ghost %{_libdir}/mozilla/plugins/libflashplayer.so |
161 |
%ifnarch x86_64 |
162 |
%ghost %{_libdir}/mozilla/plugins/LICENSE.flashplayer |
163 |
%endif |
164 |
|
165 |
|