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