2 # - HEAD - stable version
3 # - DEVEL - development version
4 # - WEEKLY - weekly development version
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
13 %define shver %(echo %{ver} | tr -d .)
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
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: 892fa890e9945809dc5f6bc19b45b0d4
27 Source11: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.x86_64.linux.tar.xz
28 # Source11-md5: 80dbb801d895c901e8518b488a837524
29 Source0: %{name}.desktop
30 Patch0: %{name}-wrapper.patch
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
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
48 ExclusiveArch: %{ix86} %{x8664}
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 %define _enable_debug_packages 0
53 %define _plugindir %{_libdir}/opera/plugins
54 %define _operadocdir %{_docdir}/%{name}-%{ver}
55 # alternative arch for plugin32
59 Opera is world fastest web browser. It supports most of nowaday
60 extensions of HTML. And it is quite stable. This version is linked
61 with shared version of Qt.
63 %description -l hu.UTF-8
64 Opera a világ leggyorsabb webböngészője. A manapság elterjedt
65 HTML-kiterjesztések túlnyomó többségét támogatja. És elég stabili is.
66 Ez a verzió a Qt megosztott verziójához linkelődik.
68 %description -l pl.UTF-8
69 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
70 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
71 wersja jest skonsolidowana dynamicznie z Qt.
74 Summary: Opera 32-bit plugins support
75 Summary(hu.UTF-8): Opera 32-bites plugin támogatás
76 Summary(pl.UTF-8): Obsługa 32-bitowych wtyczek Opery
77 Group: X11/Applications/Networking
78 Requires: %{name} = %{epoch}:%{version}-%{release}
79 Requires: browser-plugins >= 2.0
82 Opera 32-bit plugins support.
84 %description plugin32 -l hu.UTF-8
85 Opera 32-bites plugin támogatás.
87 %description plugin32 -l pl.UTF-8
88 Obsługa 32-bitowych wtyczek Opery.
92 %setup -q -T -b 10 -n %{name}-%{version}-%{buildid}.i386.linux
96 %setup -q -T -b 11 -n %{name}-%{version}-%{buildid}.x86_64.linux
100 s,@@{PREFIX},%{_prefix},g
103 ' share/{applications/*.desktop,mime/packages/*.xml}
105 sed -i -e 's,kfmclient exec,xdg-open,' share/opera/defaults/filehandler.ini
110 # remove lib32/lib64 paths so patch2 can apply (i386 build contained lib64 as well, oh well)
111 %{__sed} -i -e '/lib32\|lib64/d;$d' share/opera/defaults/pluginpath.ini
114 mv lib/opera/plugins/README README.plugins
115 mv share/opera/defaults/license.txt .
116 mv share/doc/opera/* .
118 # nobody wants scalable huge icons
119 rm -rf share/icons/hicolor/scalable
121 # opera packaging tools we don't need runtime
122 mv share/opera/package-id.ini .
125 rm -rf $RPM_BUILD_ROOT
126 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir},%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
128 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
129 # opera does not use for .xpt files
132 # use mplayerplug-in-opera instead
136 install -p opera* $RPM_BUILD_ROOT%{_bindir}
137 cp -a lib/opera $RPM_BUILD_ROOT%{_libdir}
138 cp -a share/* $RPM_BUILD_ROOT%{_datadir}
139 #cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir}
141 sed -i -e 's#/usr/lib/opera#%{_libdir}/opera#g' $RPM_BUILD_ROOT%{_bindir}/opera
143 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/operaprefs_default.ini
148 %if "%{pld_release}" == "ti"
149 sed -i -e 's#DISTRO#PLD/Titanium#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
151 %if "%{pld_release}" == "ac"
152 sed -i -e 's#DISTRO#PLD/2.0 (Ac)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
154 sed -i -e 's#DISTRO#PLD/3.0 (Th)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
159 rm -rf $RPM_BUILD_ROOT
162 %update_mime_database
163 %update_icon_cache hicolor
164 %update_desktop_database_post
165 %update_browser_plugins
168 %update_mime_database
169 %update_icon_cache hicolor
170 %update_desktop_database_postun
171 if [ "$1" = 0 ]; then
172 %update_browser_plugins
176 %update_browser_plugins
179 if [ "$1" = 0 ]; then
180 %update_browser_plugins
184 %defattr(644,root,root,755)
186 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini
189 %{_browserpluginsconfdir}/browsers.d/%{name}.*
190 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
192 %attr(755,root,root) %{_bindir}/opera
193 #%attr(755,root,root) %{_bindir}/opera-widget-manager
194 %dir %{_libdir}/opera
196 %exclude %{_libdir}/opera/*-ia32-*
198 %attr(755,root,root) %{_libdir}/opera/*.so
199 %attr(755,root,root) %{_libdir}/opera/opera*
200 %attr(755,root,root) %{_libdir}/opera/pluginwrapper/*
201 %dir %{_libdir}/opera/pluginwrapper
203 %dir %{_libdir}/opera/gstreamer
204 %dir %{_libdir}/opera/gstreamer/plugins
205 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperamatroska.so
206 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperavp8.so
207 %dir %{_datadir}/opera
208 %{_datadir}/mime/packages/opera-extension.xml
209 %{_datadir}/opera/*.*
210 %{_datadir}/opera/defaults
211 %{_datadir}/opera/extra
212 %{_datadir}/opera/skin
213 #%{_datadir}/opera/scripts
214 %{_datadir}/opera/styles
216 #%{_datadir}/opera/unite
217 %dir %{_datadir}/opera/locale
218 %{_datadir}/opera/locale/en
219 %lang(af) %{_datadir}/opera/locale/af
220 %lang(ar) %{_datadir}/opera/locale/ar
221 %lang(az) %{_datadir}/opera/locale/az
222 %lang(be) %{_datadir}/opera/locale/be
223 %lang(bg) %{_datadir}/opera/locale/bg
224 %lang(bn) %{_datadir}/opera/locale/bn
225 %lang(cs) %{_datadir}/opera/locale/cs
226 %lang(da) %{_datadir}/opera/locale/da
227 %lang(de) %{_datadir}/opera/locale/de
228 %lang(el) %{_datadir}/opera/locale/el
229 %lang(en_GB) %{_datadir}/opera/locale/en-GB
230 %lang(es_ES) %{_datadir}/opera/locale/es-ES
231 %lang(es_LA) %{_datadir}/opera/locale/es-LA
232 %lang(et) %{_datadir}/opera/locale/et
233 %lang(fa) %{_datadir}/opera/locale/fa
234 %lang(fi) %{_datadir}/opera/locale/fi
235 %lang(fr) %{_datadir}/opera/locale/fr
236 %lang(fr_CA) %{_datadir}/opera/locale/fr-CA
237 %lang(fy) %{_datadir}/opera/locale/fy
238 %lang(gd) %{_datadir}/opera/locale/gd
239 %lang(he) %{_datadir}/opera/locale/he
240 %lang(hi) %{_datadir}/opera/locale/hi
241 %lang(hr) %{_datadir}/opera/locale/hr
242 %lang(hu) %{_datadir}/opera/locale/hu
243 %lang(id) %{_datadir}/opera/locale/id
244 %lang(it) %{_datadir}/opera/locale/it
245 %lang(ja) %{_datadir}/opera/locale/ja
246 %lang(ka) %{_datadir}/opera/locale/ka
247 %lang(kk) %{_datadir}/opera/locale/kk
248 %lang(ko) %{_datadir}/opera/locale/ko
249 %lang(lt) %{_datadir}/opera/locale/lt
250 %lang(me) %{_datadir}/opera/locale/me
251 %lang(mk) %{_datadir}/opera/locale/mk
252 %lang(ms) %{_datadir}/opera/locale/ms
253 %lang(nb) %{_datadir}/opera/locale/nb
254 %lang(nl) %{_datadir}/opera/locale/nl
255 %lang(nn) %{_datadir}/opera/locale/nn
256 %lang(pa) %{_datadir}/opera/locale/pa
257 %lang(pl) %{_datadir}/opera/locale/pl
258 %lang(pt) %{_datadir}/opera/locale/pt
259 %lang(pt_BR) %{_datadir}/opera/locale/pt-BR
260 %lang(ro) %{_datadir}/opera/locale/ro
261 %lang(ru) %{_datadir}/opera/locale/ru
262 %lang(sk) %{_datadir}/opera/locale/sk
263 %lang(sr) %{_datadir}/opera/locale/sr
264 %lang(sv) %{_datadir}/opera/locale/sv
265 %lang(sw) %{_datadir}/opera/locale/sw
266 %lang(ta) %{_datadir}/opera/locale/ta
267 %lang(te) %{_datadir}/opera/locale/te
268 %lang(th) %{_datadir}/opera/locale/th
269 %lang(tl) %{_datadir}/opera/locale/tl
270 %lang(tr) %{_datadir}/opera/locale/tr
271 %lang(uk) %{_datadir}/opera/locale/uk
272 %lang(ur) %{_datadir}/opera/locale/ur
273 %lang(uz) %{_datadir}/opera/locale/uz
274 %lang(vi) %{_datadir}/opera/locale/vi
275 %lang(zh_CN) %{_datadir}/opera/locale/zh-cn
276 #%lang(zh_HK) %{_datadir}/opera/locale/zh-hk
277 %lang(zh_TW) %{_datadir}/opera/locale/zh-tw
278 %lang(zu) %{_datadir}/opera/locale/zu
279 %{_datadir}/opera/region
280 #%{_datadir}/mime/packages/opera-widget.xml
281 #%{_datadir}/mime/packages/opera-unite-application.xml
282 %{_desktopdir}/*.desktop
283 %{_mandir}/man1/opera.1*
284 #%{_mandir}/man1/opera-widget-manager.1*
285 #%{_pixmapsdir}/opera.xpm
286 %{_iconsdir}/hicolor/*/*/*.png
290 %defattr(644,root,root,755)
291 %attr(755,root,root) %{_libdir}/opera/*-ia32-*