]>
Commit | Line | Data |
---|---|---|
1 | # BRANCHES: | |
2 | # - HEAD - stable version | |
3 | # - DEVEL - development version | |
4 | # - WEEKLY - weekly development version | |
5 | # - NEXT - opera next | |
6 | # | |
7 | # NOTE: to avoid creating unreadable/unmaintainable spec: | |
8 | # - don't put static version here, create STATIC branch for that for example | |
9 | # - don't create useless bconds that for example limit SourceX: to current arch only | |
10 | # | |
11 | ||
12 | %define ver 12.16 | |
13 | %define shver %(echo %{ver} | tr -d .) | |
14 | %define buildid 1860 | |
15 | ||
16 | Summary: World fastest web browser | |
17 | Summary(hu.UTF-8): A világ leggyorsabb webböngészője | |
18 | Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie | |
19 | Name: opera | |
20 | Version: %{ver} | |
21 | Release: 1 | |
22 | Epoch: 2 | |
23 | License: Distributable | |
24 | Group: X11/Applications/Networking | |
25 | Source10: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.i386.linux.tar.xz | |
26 | # Source10-md5: 08545c66ba00a568324b1a393c8782f7 | |
27 | Source11: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.x86_64.linux.tar.xz | |
28 | # Source11-md5: ead647964ace52f44ced98adbc568ae7 | |
29 | Source0: %{name}.desktop | |
30 | Source1: %{name}.sh | |
31 | Patch1: %{name}-desktop.patch | |
32 | Patch2: %{name}-pluginpath.patch | |
33 | URL: http://www.opera.com/ | |
34 | BuildRequires: rpm >= 4.4.9-56 | |
35 | BuildRequires: rpmbuild(macros) >= 1.356 | |
36 | BuildRequires: sed >= 4.0 | |
37 | BuildRequires: xz | |
38 | Requires(post,postun): gtk-update-icon-cache | |
39 | Requires(post,postun): hicolor-icon-theme | |
40 | Requires(post,postun): shared-mime-info | |
41 | Requires: browser-plugins >= 2.0 | |
42 | Requires: desktop-file-utils | |
43 | Requires: freetype >= 2 | |
44 | Suggests: gstreamer-theora | |
45 | Suggests: gstreamer-vorbis | |
46 | Provides: wwwbrowser | |
47 | Obsoletes: opera-i18n | |
48 | ExclusiveArch: %{ix86} %{x8664} | |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
50 | ||
51 | %define _enable_debug_packages 0 | |
52 | ||
53 | %define _noautoreq 'libcurl.so.4\\(CURL_OPENSSL_3\\)' | |
54 | ||
55 | %define _plugindir %{_libdir}/opera/plugins | |
56 | %define _operadocdir %{_docdir}/%{name}-%{ver} | |
57 | # alternative arch for plugin32 | |
58 | %define alt_arch i386 | |
59 | ||
60 | %description | |
61 | Opera is world fastest web browser. It supports most of nowaday | |
62 | extensions of HTML. And it is quite stable. This version is linked | |
63 | with shared version of Qt. | |
64 | ||
65 | %description -l hu.UTF-8 | |
66 | Opera a világ leggyorsabb webböngészője. A manapság elterjedt | |
67 | HTML-kiterjesztések túlnyomó többségét támogatja. És elég stabili is. | |
68 | Ez a verzió a Qt megosztott verziójához linkelődik. | |
69 | ||
70 | %description -l pl.UTF-8 | |
71 | Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość | |
72 | dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta | |
73 | wersja jest skonsolidowana dynamicznie z Qt. | |
74 | ||
75 | %package plugin32 | |
76 | Summary: Opera 32-bit plugins support | |
77 | Summary(hu.UTF-8): Opera 32-bites plugin támogatás | |
78 | Summary(pl.UTF-8): Obsługa 32-bitowych wtyczek Opery | |
79 | Group: X11/Applications/Networking | |
80 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
81 | Requires: browser-plugins >= 2.0 | |
82 | ||
83 | %description plugin32 | |
84 | Opera 32-bit plugins support. | |
85 | ||
86 | %description plugin32 -l hu.UTF-8 | |
87 | Opera 32-bites plugin támogatás. | |
88 | ||
89 | %description plugin32 -l pl.UTF-8 | |
90 | Obsługa 32-bitowych wtyczek Opery. | |
91 | ||
92 | %prep | |
93 | %ifarch %{ix86} | |
94 | %setup -q -T -b 10 -n %{name}-%{version}-%{buildid}.i386.linux | |
95 | %endif | |
96 | %ifarch %{x8664} | |
97 | %setup -q -T -b 11 -n %{name}-%{version}-%{buildid}.x86_64.linux | |
98 | %endif | |
99 | ||
100 | sed -e 's#/usr/lib/opera#%{_libdir}/opera#g' %{SOURCE1} > opera | |
101 | ||
102 | %{__sed} -i -e ' | |
103 | s,@@{PREFIX},%{_prefix},g | |
104 | s,@@{SUFFIX},, | |
105 | s,@@{_SUFFIX},, | |
106 | ' share/{applications/*.desktop,mime/packages/*.xml} | |
107 | ||
108 | %{__sed} -i -e 's,kfmclient exec,xdg-open,' share/opera/defaults/filehandler.ini | |
109 | ||
110 | %patch1 -p1 | |
111 | ||
112 | # remove lib32/lib64 paths so patch2 can apply (i386 build contained lib64 as well, oh well) | |
113 | %{__sed} -i -e '/lib32\|lib64/d;$d' share/opera/defaults/pluginpath.ini | |
114 | %patch2 -p1 | |
115 | ||
116 | mv lib/opera/plugins/README README.plugins | |
117 | mv share/opera/defaults/license.txt . | |
118 | mv share/doc/opera/* . | |
119 | ||
120 | # nobody wants scalable huge icons | |
121 | rm -rf share/icons/hicolor/scalable | |
122 | ||
123 | # opera packaging tools we don't need runtime | |
124 | mv share/opera/package-id.ini . | |
125 | ||
126 | # cleanup backups after patching | |
127 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
128 | ||
129 | %install | |
130 | rm -rf $RPM_BUILD_ROOT | |
131 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir},%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}} | |
132 | ||
133 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF' | |
134 | # opera does not use for .xpt files | |
135 | *.xpt | |
136 | ||
137 | # use mplayerplug-in-opera instead | |
138 | mplayerplug-in* | |
139 | EOF | |
140 | ||
141 | install -p opera* $RPM_BUILD_ROOT%{_bindir} | |
142 | cp -a lib/opera $RPM_BUILD_ROOT%{_libdir} | |
143 | cp -a share/* $RPM_BUILD_ROOT%{_datadir} | |
144 | ln -s %{_docdir}/%{name}-%{version}/LICENSE $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults/license.txt | |
145 | #cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir} | |
146 | ||
147 | cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/operaprefs_default.ini | |
148 | [ISP] | |
149 | Id="DISTRO" | |
150 | EOF | |
151 | ||
152 | %if "%{pld_release}" == "ti" | |
153 | sed -i -e 's#DISTRO#PLD/Titanium#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini | |
154 | %else | |
155 | %if "%{pld_release}" == "ac" | |
156 | sed -i -e 's#DISTRO#PLD/2.0 (Ac)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini | |
157 | %else | |
158 | sed -i -e 's#DISTRO#PLD/3.0 (Th)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini | |
159 | %endif | |
160 | %endif | |
161 | ||
162 | %clean | |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
165 | %post | |
166 | %update_mime_database | |
167 | %update_icon_cache hicolor | |
168 | %update_desktop_database_post | |
169 | %update_browser_plugins | |
170 | ||
171 | %postun | |
172 | %update_mime_database | |
173 | %update_icon_cache hicolor | |
174 | %update_desktop_database_postun | |
175 | if [ "$1" = 0 ]; then | |
176 | %update_browser_plugins | |
177 | fi | |
178 | ||
179 | %post plugin32 | |
180 | %update_browser_plugins | |
181 | ||
182 | %postun plugin32 | |
183 | if [ "$1" = 0 ]; then | |
184 | %update_browser_plugins | |
185 | fi | |
186 | ||
187 | %files | |
188 | %defattr(644,root,root,755) | |
189 | %doc LICENSE | |
190 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini | |
191 | ||
192 | # browser plugins v2 | |
193 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
194 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
195 | ||
196 | %attr(755,root,root) %{_bindir}/opera | |
197 | #%attr(755,root,root) %{_bindir}/opera-widget-manager | |
198 | %dir %{_libdir}/opera | |
199 | %ifarch %{x8664} | |
200 | %exclude %{_libdir}/opera/pluginwrapper/*-ia32-* | |
201 | %endif | |
202 | %attr(755,root,root) %{_libdir}/opera/*.so | |
203 | %attr(755,root,root) %{_libdir}/opera/opera* | |
204 | %dir %{_libdir}/opera/pluginwrapper | |
205 | %attr(755,root,root) %{_libdir}/opera/pluginwrapper/* | |
206 | %dir %{_plugindir} | |
207 | %dir %{_libdir}/opera/gstreamer | |
208 | %dir %{_libdir}/opera/gstreamer/plugins | |
209 | %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperamatroska.so | |
210 | %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperavp8.so | |
211 | %dir %{_datadir}/opera | |
212 | %{_datadir}/mime/packages/opera-extension.xml | |
213 | %{_datadir}/opera/*.* | |
214 | %{_datadir}/opera/defaults | |
215 | %{_datadir}/opera/extra | |
216 | %{_datadir}/opera/skin | |
217 | #%{_datadir}/opera/scripts | |
218 | %{_datadir}/opera/styles | |
219 | %{_datadir}/opera/ui | |
220 | #%{_datadir}/opera/unite | |
221 | %dir %{_datadir}/opera/locale | |
222 | %{_datadir}/opera/locale/en | |
223 | %lang(af) %{_datadir}/opera/locale/af | |
224 | %lang(ar) %{_datadir}/opera/locale/ar | |
225 | %lang(az) %{_datadir}/opera/locale/az | |
226 | %lang(be) %{_datadir}/opera/locale/be | |
227 | %lang(bg) %{_datadir}/opera/locale/bg | |
228 | %lang(bn) %{_datadir}/opera/locale/bn | |
229 | %lang(cs) %{_datadir}/opera/locale/cs | |
230 | %lang(da) %{_datadir}/opera/locale/da | |
231 | %lang(de) %{_datadir}/opera/locale/de | |
232 | %lang(el) %{_datadir}/opera/locale/el | |
233 | %lang(en_GB) %{_datadir}/opera/locale/en-GB | |
234 | %lang(es_ES) %{_datadir}/opera/locale/es-ES | |
235 | %lang(es_LA) %{_datadir}/opera/locale/es-LA | |
236 | %lang(et) %{_datadir}/opera/locale/et | |
237 | %lang(fa) %{_datadir}/opera/locale/fa | |
238 | %lang(fi) %{_datadir}/opera/locale/fi | |
239 | %lang(fr) %{_datadir}/opera/locale/fr | |
240 | %lang(fr_CA) %{_datadir}/opera/locale/fr-CA | |
241 | %lang(fy) %{_datadir}/opera/locale/fy | |
242 | %lang(gd) %{_datadir}/opera/locale/gd | |
243 | %lang(he) %{_datadir}/opera/locale/he | |
244 | %lang(hi) %{_datadir}/opera/locale/hi | |
245 | %lang(hr) %{_datadir}/opera/locale/hr | |
246 | %lang(hu) %{_datadir}/opera/locale/hu | |
247 | %lang(id) %{_datadir}/opera/locale/id | |
248 | %lang(it) %{_datadir}/opera/locale/it | |
249 | %lang(ja) %{_datadir}/opera/locale/ja | |
250 | %lang(ka) %{_datadir}/opera/locale/ka | |
251 | %lang(kk) %{_datadir}/opera/locale/kk | |
252 | %lang(ko) %{_datadir}/opera/locale/ko | |
253 | %lang(lt) %{_datadir}/opera/locale/lt | |
254 | %lang(lt) %{_datadir}/opera/locale/lv | |
255 | %lang(me) %{_datadir}/opera/locale/me | |
256 | %lang(mk) %{_datadir}/opera/locale/mk | |
257 | %lang(ms) %{_datadir}/opera/locale/ms | |
258 | %lang(nb) %{_datadir}/opera/locale/nb | |
259 | %lang(nl) %{_datadir}/opera/locale/nl | |
260 | %lang(nn) %{_datadir}/opera/locale/nn | |
261 | %lang(pa) %{_datadir}/opera/locale/pa | |
262 | %lang(pl) %{_datadir}/opera/locale/pl | |
263 | %lang(pt) %{_datadir}/opera/locale/pt | |
264 | %lang(pt_BR) %{_datadir}/opera/locale/pt-BR | |
265 | %lang(ro) %{_datadir}/opera/locale/ro | |
266 | %lang(ru) %{_datadir}/opera/locale/ru | |
267 | %lang(sk) %{_datadir}/opera/locale/sk | |
268 | %lang(sr) %{_datadir}/opera/locale/sr | |
269 | %lang(sv) %{_datadir}/opera/locale/sv | |
270 | %lang(sw) %{_datadir}/opera/locale/sw | |
271 | %lang(ta) %{_datadir}/opera/locale/ta | |
272 | %lang(te) %{_datadir}/opera/locale/te | |
273 | %lang(th) %{_datadir}/opera/locale/th | |
274 | %lang(tl) %{_datadir}/opera/locale/tl | |
275 | %lang(tr) %{_datadir}/opera/locale/tr | |
276 | %lang(uk) %{_datadir}/opera/locale/uk | |
277 | %lang(ur) %{_datadir}/opera/locale/ur | |
278 | %lang(uz) %{_datadir}/opera/locale/uz | |
279 | %lang(vi) %{_datadir}/opera/locale/vi | |
280 | %lang(zh_CN) %{_datadir}/opera/locale/zh-cn | |
281 | #%lang(zh_HK) %{_datadir}/opera/locale/zh-hk | |
282 | %lang(zh_TW) %{_datadir}/opera/locale/zh-tw | |
283 | %lang(zu) %{_datadir}/opera/locale/zu | |
284 | %{_datadir}/opera/region | |
285 | #%{_datadir}/mime/packages/opera-widget.xml | |
286 | #%{_datadir}/mime/packages/opera-unite-application.xml | |
287 | %{_desktopdir}/*.desktop | |
288 | %{_mandir}/man1/opera.1* | |
289 | #%{_mandir}/man1/opera-widget-manager.1* | |
290 | #%{_pixmapsdir}/opera.xpm | |
291 | %{_iconsdir}/hicolor/*/*/*.png | |
292 | ||
293 | %ifarch %{x8664} | |
294 | %files plugin32 | |
295 | %defattr(644,root,root,755) | |
296 | %attr(755,root,root) %{_libdir}/opera/pluginwrapper/*-ia32-* | |
297 | %endif |