/[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 134259 - (hide annotations) (download)
Wed Aug 17 22:32:46 2011 UTC (12 years, 8 months ago) by anssi
File size: 8194 byte(s)
new version
1 ennael 89107
2     %define name flash-player-plugin
3 anssi 134259 %define version 10.3.183.5
4 ennael 89107 %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 anssi 98265 BuildRequires: kde4-macros
51 ennael 89107 BuildRoot: %{_tmppath}/%{name}-root
52    
53     %description
54     Adobe Flash Player plugin for browsers.
55    
56     NOTE: This package does not contain the Flash Player itself. The
57     software will be automatically downloaded from Adobe during package
58     installation. Alternatively you can use the command
59     "download-flash-player-plugin" manually.
60    
61     Installing this package indicates acceptance of the EULA, available
62     from http://www.adobe.com/products/eulas/players/flash/.
63    
64     %prep
65     %setup -c -T
66    
67     # The linuxdownload.adobe.com rpm usually stays up longer, but fpdownload.macromedia.com is faster.
68     # Their md5sums differ.
69     %ifarch %ix86
70     %define downurl1 http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%version-release.i386.rpm
71 anssi 134259 %define tmd5sum1 05df93d6f61f555bec3267ea6eeb54f0
72 ennael 89107 %define downurl2 http://linuxdownload.adobe.com/linux/i386/flash-plugin-%version-release.i386.rpm
73 anssi 134259 %define tmd5sum2 c02f9b54d942c0b0d59edb1cbff2ae6b
74 ennael 89107 %define tarname flash-plugin-%version-release.i386.rpm
75     %define tartype rpm
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     %endif
85    
86     cat > download-flash-player-plugin <<EOF
87     #!/bin/sh
88     TARBALLDIR="%{_localstatedir}/lib/%{name}"
89     FILENAME="%{tarname}"
90     FILETYPE="%{tartype}"
91     MD5SUM1="%{tmd5sum1}"
92     MD5SUM2="%{tmd5sum2}"
93     MD5SUM3=
94     URL1="%{downurl1}"
95     URL2="%{downurl2}"
96     URL3=
97 anssi 98265 FILE1_SRC="usr/lib/flash-plugin/libflashplayer.so"
98 ennael 89107 FILE1_DST="%{_libdir}/mozilla/plugins/libflashplayer.so"
99 anssi 98265 FILE2_SRC="usr/lib/flash-plugin/LICENSE"
100 ennael 89107 FILE2_DST="%{_libdir}/mozilla/plugins/LICENSE.flashplayer"
101 anssi 98265 FILE3_SRC="usr/lib/flash-plugin/README"
102     FILE3_DST="%{_libdir}/mozilla/plugins/README.flashplayer"
103    
104     FILE4_SRC="usr/bin/flash-player-properties"
105     FILE4_DST="%{_bindir}/flash-player-properties"
106     FILE5_SRC="usr/share/applications/flash-player-properties.desktop"
107     FILE5_DST="%{_datadir}/applications/flash-player-properties.desktop"
108    
109     FILE6_SRC="usr/share/icons/hicolor/16x16/apps/flash-player-properties.png"
110     FILE6_DST="%{_iconsdir}/hicolor/16x16/apps/flash-player-properties.png"
111     FILE7_SRC="usr/share/icons/hicolor/22x22/apps/flash-player-properties.png"
112     FILE7_DST="%{_iconsdir}/hicolor/22x22/apps/flash-player-properties.png"
113     FILE8_SRC="usr/share/icons/hicolor/24x24/apps/flash-player-properties.png"
114     FILE8_DST="%{_iconsdir}/hicolor/24x24/apps/flash-player-properties.png"
115     FILE9_SRC="usr/share/icons/hicolor/32x32/apps/flash-player-properties.png"
116     FILE9_DST="%{_iconsdir}/hicolor/32x32/apps/flash-player-properties.png"
117     FILE10_SRC="usr/share/icons/hicolor/48x48/apps/flash-player-properties.png"
118     FILE10_DST="%{_iconsdir}/hicolor/48x48/apps/flash-player-properties.png"
119    
120     FILE11_SRC="usr/lib/kde4/kcm_adobe_flash_player.so"
121     FILE11_DST="%{_kde_libdir}/kde4/kcm_adobe_flash_player.so"
122     FILE12_SRC="usr/share/kde4/services/kcm_adobe_flash_player.desktop"
123     FILE12_DST="%{_kde_services}/kcm_adobe_flash_player.desktop"
124    
125     FILE13_SRC=
126    
127 ennael 89107 EOF
128     cat %SOURCE0 >> download-flash-player-plugin
129    
130 anssi 98265 cat >> download-flash-player-plugin <<EOF
131     %{_bindir}/gtk-update-icon-cache --force --quiet %{_iconsdir}/hicolor &>/dev/null
132     EOF
133    
134 ennael 89107 %ifarch %ix86
135     cat >> download-flash-player-plugin <<EOF
136     if [ "\$(uname -m)" == x86_64 ]; then
137     if [ -x %{_bindir}/nspluginwrapper ]; then
138     echo "Detected x86_64 with nspluginwrapper, enabling the plugin on 64bit browsers too."
139     %{_bindir}/nspluginwrapper -i %{_libdir}/mozilla/plugins/libflashplayer.so
140     else
141     echo "Install nspluginwrapper if you want to use the plugin with 64bit browsers too."
142     fi
143 anssi 98265 echo "Note: Adobe Flash Player configurator can only be accessed from the normal Tools"
144     echo "menu instead of KDE System Settings (due to this being a 64bit system)."
145     rm -f %{_kde_services}/kcm_adobe_flash_player.desktop
146     sed -i 's,NotShowIn=KDE;,,' %{_datadir}/applications/flash-player-properties.desktop
147     # otherwise KDE hides it:
148     sed -i 's,GNOME;,,' %{_datadir}/applications/flash-player-properties.desktop
149 ennael 89107 fi
150     EOF
151     %endif
152    
153     %install
154     rm -rf %{buildroot}
155    
156     install -d -m755 %{buildroot}%{_localstatedir}/lib/%{name}
157     install -d -m755 %{buildroot}%{_libdir}/mozilla/plugins
158     touch %{buildroot}%{_libdir}/mozilla/plugins/libflashplayer.so
159     touch %{buildroot}%{_libdir}/mozilla/plugins/LICENSE.flashplayer
160 anssi 98265 touch %{buildroot}%{_libdir}/mozilla/plugins/README.flashplayer
161 ennael 89107 touch %{buildroot}%{_localstatedir}/lib/%{name}/%{tarname}
162    
163 anssi 98265 install -d -m755 %{buildroot}%{_bindir}
164     touch %{buildroot}%{_bindir}/flash-player-properties
165    
166     install -d -m755 %{buildroot}%{_kde_services}
167     touch %{buildroot}%{_kde_services}/kcm_adobe_flash_player.desktop
168     install -d -m755 %{buildroot}%{_kde_libdir}/kde4
169     touch %{buildroot}%{_kde_libdir}/kde4/kcm_adobe_flash_player.so
170    
171     install -d -m755 %{buildroot}%{_datadir}/applications
172     touch %{buildroot}%{_datadir}/applications/flash-player-properties.desktop
173    
174     for i in 16 22 24 32 48; do
175     install -d -m755 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps
176     touch %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/flash-player-properties.png
177     done
178    
179 ennael 89107 install -d -m755 %{buildroot}%{_sbindir}
180     install -m755 download-flash-player-plugin %{buildroot}%{_sbindir}
181    
182     %clean
183     rm -rf %{buildroot}
184    
185     # posttrans so that we can use postun safely without if's :)
186     %posttrans
187     %{_sbindir}/download-flash-player-plugin
188    
189     %ifarch %ix86
190     %postun
191     if [ -x %{_bindir}/nspluginwrapper ] && [ "$(uname -m)" == x86_64 ] && [ -f %{_prefix}/lib64/mozilla/plugins/npwrapper.libflashplayer.so ]; then
192     %{_bindir}/nspluginwrapper -r %{_prefix}/lib64/mozilla/plugins/npwrapper.libflashplayer.so
193     fi
194     %endif
195    
196     %files
197     %defattr(-,root,root)
198     %{_sbindir}/download-flash-player-plugin
199     %dir %{_localstatedir}/lib/%{name}
200     %ghost %{_localstatedir}/lib/%{name}/%{tarname}
201     %dir %{_libdir}/mozilla
202     %dir %{_libdir}/mozilla/plugins
203     %ghost %{_libdir}/mozilla/plugins/libflashplayer.so
204     %ghost %{_libdir}/mozilla/plugins/LICENSE.flashplayer
205 anssi 98265 %ghost %{_libdir}/mozilla/plugins/README.flashplayer
206 ennael 89107
207 anssi 98265 %ghost %{_bindir}/flash-player-properties
208     %ghost %{_datadir}/applications/flash-player-properties.desktop
209     %ghost %{_iconsdir}/hicolor/*/apps/flash-player-properties.png
210 ennael 89107
211 anssi 98265 # Prevent unowned directories on non-KDE systems
212     %dir %{_kde_libdir}/kde4
213     %dir %{_datadir}/kde4
214     %dir %{_kde_services}
215    
216     %ghost %{_kde_libdir}/kde4/kcm_adobe_flash_player.so
217     %ghost %{_kde_services}/kcm_adobe_flash_player.desktop

  ViewVC Help
Powered by ViewVC 1.1.30