]>
Commit | Line | Data |
---|---|---|
1 | # NOTES: | |
2 | # - release archives: http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html | |
3 | # TODO: package kde4 component | |
4 | # | |
5 | # Conditional build: | |
6 | %bcond_with license_agreement # generates package | |
7 | ||
8 | %define ver32 11.2.202.535 | |
9 | %define ver64 11.2.202.535 | |
10 | ||
11 | %ifarch %{ix86} | |
12 | %define version %{ver32} | |
13 | %define libmark %{nil} | |
14 | %endif | |
15 | %ifarch %{x8664} | |
16 | %define version %{ver64} | |
17 | %define libmark ()(64bit) | |
18 | %endif | |
19 | ||
20 | %define base_name adobe-flash | |
21 | %define rel 1 | |
22 | Summary: Flash plugin for Netscape-compatible WWW browsers | |
23 | Summary(pl.UTF-8): Wtyczka Flash dla przeglądarek WWW zgodnych z Netscape | |
24 | %if %{with license_agreement} | |
25 | Name: %{base_name} | |
26 | %else | |
27 | Name: %{base_name}-installer | |
28 | %endif | |
29 | Version: %{version} | |
30 | Release: %{rel}%{?with_license_agreement:wla} | |
31 | Epoch: 1 | |
32 | License: Free to use, non-distributable | |
33 | Group: X11/Applications/Multimedia | |
34 | %if %{with license_agreement} | |
35 | Source0: http://fpdownload.macromedia.com/get/flashplayer/pdc/%{ver32}/install_flash_player_11_linux.i386.tar.gz?/flash-%{version}.i386.tar.gz | |
36 | # NoSource0-md5: | |
37 | NoSource: 0 | |
38 | Source1: http://fpdownload.macromedia.com/get/flashplayer/pdc/%{ver64}/install_flash_player_11_linux.x86_64.tar.gz?/flash-%{version}.x86_64.tar.gz | |
39 | # NoSource1-md5: | |
40 | NoSource: 1 | |
41 | %else | |
42 | Source3: http://svn.pld-linux.org/svn/license-installer/license-installer.sh | |
43 | # Source3-md5: 329c25f457fea66ec502b7ef70cb9ede | |
44 | %endif | |
45 | Source2: mms.cfg | |
46 | URL: http://www.adobe.com/products/flashplayer/ | |
47 | Patch0: desktop.patch | |
48 | %if %{with license_agreement} | |
49 | BuildRequires: rpmbuild(macros) >= 1.357 | |
50 | BuildRequires: sed >= 4.0 | |
51 | Requires: browser-plugins >= 2.0 | |
52 | Requires: hicolor-icon-theme | |
53 | # dlopened by player | |
54 | Requires: libasound.so.2%{libmark} | |
55 | Requires: libcurl.so.4%{libmark} | |
56 | %else | |
57 | Requires: rpm-build-tools >= 4.4.37 | |
58 | Requires: rpmbuild(macros) >= 1.544 | |
59 | %endif | |
60 | Requires: cpuinfo(sse2) | |
61 | Provides: browser(flash) | |
62 | Provides: macromedia-flash | |
63 | Obsoletes: flash-plugin | |
64 | Obsoletes: konqueror-plugin-macromedia-flash | |
65 | Obsoletes: macromedia-flash | |
66 | Obsoletes: mozilla-firefox-plugin-macromedia-flash | |
67 | Obsoletes: mozilla-plugin-macromedia-flash | |
68 | ExclusiveArch: %{ix86} %{x8664} | |
69 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
70 | ||
71 | %define _sysconfdir /etc/adobe | |
72 | ||
73 | # So that building package on AC system won't write package name dep that Th system can't understand (libstdc++4) | |
74 | %define _noautoreqdep libstdc++.so.6 | |
75 | ||
76 | # No debuginfo to be stored | |
77 | %define _enable_debug_packages 0 | |
78 | ||
79 | %description | |
80 | Adobe(R) Flash(R) Player for Linux - the next-generation client | |
81 | runtime for engaging with Flash content and applications on Linux. | |
82 | ||
83 | %description -l pl.UTF-8 | |
84 | Adobe(R) Flash(R) Player - środowisko nowej generacji do obsługi | |
85 | treści i aplikacji we Flashu pod Linuksem. | |
86 | ||
87 | %prep | |
88 | %if %{with license_agreement} | |
89 | %ifarch %{x8664} | |
90 | %setup -q -T -c -b 1 | |
91 | %else | |
92 | %setup -q -T -c -b 0 | |
93 | %endif | |
94 | %patch0 -p1 | |
95 | ||
96 | %build | |
97 | s=$(echo 'LNX %{version}' | tr . ,) | |
98 | v=$(strings libflashplayer.so | grep '^LNX ') | |
99 | if [ "$v" != "$s" ]; then | |
100 | : wrong version | |
101 | exit 1 | |
102 | fi | |
103 | %endif | |
104 | ||
105 | %install | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | %if %{without license_agreement} | |
108 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}} | |
109 | ||
110 | sed -e ' | |
111 | s/@BASE_NAME@/%{base_name}/g | |
112 | s/@TARGET_CPU@/%{_target_cpu}/g | |
113 | s-@VERSION@-%{version}-g | |
114 | s-@RELEASE@-%{release}-g | |
115 | s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g | |
116 | s,@DATADIR@,%{_datadir}/%{base_name},g | |
117 | s,@COPYSOURCES@,mms.cfg desktop.patch,g | |
118 | ' %{SOURCE3} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install | |
119 | ||
120 | cp -p %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
121 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
122 | cp -p %{PATCH0} $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
123 | ||
124 | %else | |
125 | ||
126 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_browserpluginsdir},%{_bindir},%{_desktopdir},%{_iconsdir}} | |
127 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/mms.cfg | |
128 | install -p *.so $RPM_BUILD_ROOT%{_browserpluginsdir} | |
129 | install -p usr/bin/flash-player-properties $RPM_BUILD_ROOT%{_bindir} | |
130 | cp -p usr/share/applications/flash-player-properties.desktop $RPM_BUILD_ROOT%{_desktopdir}/flash-player-properties.desktop | |
131 | cp -a usr/share/icons/* $RPM_BUILD_ROOT%{_iconsdir} | |
132 | %endif | |
133 | ||
134 | %clean | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
137 | %if %{without license_agreement} | |
138 | %post | |
139 | %{_bindir}/%{base_name}.install | |
140 | %else | |
141 | %post | |
142 | %update_browser_plugins | |
143 | %update_icon_cache hicolor | |
144 | ||
145 | %postun | |
146 | if [ "$1" = 0 ]; then | |
147 | %update_browser_plugins | |
148 | fi | |
149 | %update_icon_cache hicolor | |
150 | %endif | |
151 | ||
152 | %files | |
153 | %defattr(644,root,root,755) | |
154 | %if %{without license_agreement} | |
155 | %attr(755,root,root) %{_bindir}/%{base_name}.install | |
156 | %{_datadir}/%{base_name} | |
157 | %else | |
158 | %doc readme.txt | |
159 | %dir %{_sysconfdir} | |
160 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mms.cfg | |
161 | %attr(755,root,root) %{_bindir}/flash-player-properties | |
162 | %attr(755,root,root) %{_browserpluginsdir}/*.so | |
163 | %{_desktopdir}/flash-player-properties.desktop | |
164 | %{_iconsdir}/hicolor/*/apps/*.png | |
165 | %endif |