2 # - HEAD - stable version
3 # - DEVEL - development version
4 # - WEEKLY - weekly development version
6 # NOTE: to avoid creating unreadable/unmaintainable spec:
7 # - don't put static version here, create STATIC branch for that for example
8 # - don't create useless bconds that for example limit SourceX: to current arch only
12 %define shver %(echo %{ver} | tr -d .)
15 Summary: World fastest web browser
16 Summary(hu.UTF-8): A világ leggyorsabb webböngészője
17 Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
22 License: Distributable
23 Group: X11/Applications/Networking
24 Source10: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.i386.linux.tar.xz
25 # Source10-md5: f3de6d706152cbe25702f70969124f44
26 Source11: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.x86_64.linux.tar.xz
27 # Source11-md5: 206550f16b98dd3dfd3063912dcba53a
28 Source0: %{name}.desktop
29 Patch0: %{name}-wrapper.patch
30 Patch1: %{name}-desktop.patch
31 Patch2: %{name}-pluginpath.patch
32 URL: http://www.opera.com/
33 BuildRequires: rpm >= 4.4.9-56
34 BuildRequires: rpmbuild(macros) >= 1.356
35 BuildRequires: sed >= 4.0
37 Requires(post,postun): gtk-update-icon-cache
38 Requires(post,postun): hicolor-icon-theme
39 Requires(post,postun): shared-mime-info
40 Requires: browser-plugins >= 2.0
41 Requires: desktop-file-utils
42 Requires: freetype >= 2
43 Suggests: gstreamer-theora
44 Suggests: gstreamer-vorbis
47 ExclusiveArch: %{ix86} %{x8664}
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 %define _enable_debug_packages 0
52 %define _plugindir %{_libdir}/opera/plugins
53 %define _operadocdir %{_docdir}/%{name}-%{ver}
54 # alternative arch for plugin32
58 Opera is world fastest web browser. It supports most of nowaday
59 extensions of HTML. And it is quite stable. This version is linked
60 with shared version of Qt.
62 %description -l hu.UTF-8
63 Opera a világ leggyorsabb webböngészője. A manapság elterjedt
64 HTML-kiterjesztések túlnyomó többségét támogatja. És elég stabili is.
65 Ez a verzió a Qt megosztott verziójához linkelődik.
67 %description -l pl.UTF-8
68 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
69 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
70 wersja jest skonsolidowana dynamicznie z Qt.
73 Summary: Opera 32-bit plugins support
74 Summary(hu.UTF-8): Opera 32-bites plugin támogatás
75 Summary(pl.UTF-8): Obsługa 32-bitowych wtyczek Opery
76 Group: X11/Applications/Networking
77 Requires: %{name} = %{epoch}:%{version}-%{release}
78 Requires: browser-plugins >= 2.0
81 Opera 32-bit plugins support.
83 %description plugin32 -l hu.UTF-8
84 Opera 32-bites plugin támogatás.
86 %description plugin32 -l pl.UTF-8
87 Obsługa 32-bitowych wtyczek Opery.
91 %setup -q -T -b 10 -n %{name}-%{version}-%{buildid}.i386.linux
95 %setup -q -T -b 11 -n %{name}-%{version}-%{buildid}.x86_64.linux
99 s,@@{PREFIX},%{_prefix},g
102 ' share/{applications/*.desktop,mime/packages/*.xml}
104 sed -i -e 's,kfmclient exec,xdg-open,' share/opera/defaults/filehandler.ini
109 # remove lib32/lib64 paths so patch2 can apply (i386 build contained lib64 as well, oh well)
110 %{__sed} -i -e '/lib32\|lib64/d;$d' share/opera/defaults/pluginpath.ini
113 mv lib/opera/plugins/README README.plugins
114 mv share/opera/defaults/license.txt .
115 mv share/doc/opera/* .
117 # nobody wants scalable huge icons
118 rm -rf share/icons/hicolor/scalable
120 # opera packaging tools we don't need runtime
121 mv share/opera/package .
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir},%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
127 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
128 # opera does not use for .xpt files
131 # use mplayerplug-in-opera instead
135 install -p opera* $RPM_BUILD_ROOT%{_bindir}
136 cp -a lib/opera $RPM_BUILD_ROOT%{_libdir}
137 cp -a share/* $RPM_BUILD_ROOT%{_datadir}
138 #cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir}
140 sed -i -e 's#/usr/lib/opera#%{_libdir}/opera#g' $RPM_BUILD_ROOT%{_bindir}/opera
142 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/operaprefs_default.ini
147 %if "%{pld_release}" == "ti"
148 sed -i -e 's#DISTRO#PLD/Titanium#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
150 %if "%{pld_release}" == "ac"
151 sed -i -e 's#DISTRO#PLD/2.0 (Ac)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
153 sed -i -e 's#DISTRO#PLD/3.0 (Th)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
158 rm -rf $RPM_BUILD_ROOT
161 %update_mime_database
162 %update_icon_cache hicolor
163 %update_desktop_database_post
164 %update_browser_plugins
167 %update_mime_database
168 %update_icon_cache hicolor
169 %update_desktop_database_postun
170 if [ "$1" = 0 ]; then
171 %update_browser_plugins
175 %update_browser_plugins
178 if [ "$1" = 0 ]; then
179 %update_browser_plugins
183 %defattr(644,root,root,755)
185 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini
188 %{_browserpluginsconfdir}/browsers.d/%{name}.*
189 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
191 %attr(755,root,root) %{_bindir}/opera
192 %attr(755,root,root) %{_bindir}/opera-widget-manager
193 %dir %{_libdir}/opera
195 %exclude %{_libdir}/opera/*-ia32-*
197 %attr(755,root,root) %{_libdir}/opera/*.so
198 %attr(755,root,root) %{_libdir}/opera/opera*
200 %dir %{_libdir}/opera/gstreamer
201 %dir %{_libdir}/opera/gstreamer/plugins
202 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperamatroska.so
203 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperavp8.so
204 %dir %{_datadir}/opera
205 %{_datadir}/mime/packages/opera-extension.xml
206 %{_datadir}/opera/*.*
207 %{_datadir}/opera/defaults
208 %{_datadir}/opera/extra
209 %{_datadir}/opera/skin
210 #%{_datadir}/opera/scripts
211 %{_datadir}/opera/styles
213 %{_datadir}/opera/unite
214 %dir %{_datadir}/opera/locale
215 %{_datadir}/opera/locale/en
216 #%lang(af) %{_datadir}/opera/locale/af
217 #%lang(az) %{_datadir}/opera/locale/az
218 %lang(be) %{_datadir}/opera/locale/be
219 %lang(bg) %{_datadir}/opera/locale/bg
220 %lang(cs) %{_datadir}/opera/locale/cs
221 %lang(da) %{_datadir}/opera/locale/da
222 %lang(de) %{_datadir}/opera/locale/de
223 %lang(el) %{_datadir}/opera/locale/el
224 %lang(en_GB) %{_datadir}/opera/locale/en-GB
225 %lang(es_ES) %{_datadir}/opera/locale/es-ES
226 %lang(es_LA) %{_datadir}/opera/locale/es-LA
227 %lang(et) %{_datadir}/opera/locale/et
228 %lang(fi) %{_datadir}/opera/locale/fi
229 %lang(fr) %{_datadir}/opera/locale/fr
230 %lang(fr_CA) %{_datadir}/opera/locale/fr-CA
231 %lang(fy) %{_datadir}/opera/locale/fy
232 %lang(gd) %{_datadir}/opera/locale/gd
233 %lang(hi) %{_datadir}/opera/locale/hi
234 %lang(hr) %{_datadir}/opera/locale/hr
235 %lang(hu) %{_datadir}/opera/locale/hu
236 %lang(id) %{_datadir}/opera/locale/id
237 %lang(it) %{_datadir}/opera/locale/it
238 %lang(ja) %{_datadir}/opera/locale/ja
239 %lang(ka) %{_datadir}/opera/locale/ka
240 %lang(ko) %{_datadir}/opera/locale/ko
241 %lang(lt) %{_datadir}/opera/locale/lt
242 #%lang(me) %{_datadir}/opera/locale/me
243 %lang(mk) %{_datadir}/opera/locale/mk
244 #%lang(ms) %{_datadir}/opera/locale/ms
245 %lang(nb) %{_datadir}/opera/locale/nb
246 %lang(nl) %{_datadir}/opera/locale/nl
247 %lang(nn) %{_datadir}/opera/locale/nn
248 %lang(pl) %{_datadir}/opera/locale/pl
249 %lang(pt) %{_datadir}/opera/locale/pt
250 %lang(pt_BR) %{_datadir}/opera/locale/pt-BR
251 %lang(ro) %{_datadir}/opera/locale/ro
252 %lang(ru) %{_datadir}/opera/locale/ru
253 %lang(sk) %{_datadir}/opera/locale/sk
254 %lang(sr) %{_datadir}/opera/locale/sr
255 %lang(sv) %{_datadir}/opera/locale/sv
256 %lang(ta) %{_datadir}/opera/locale/ta
257 %lang(te) %{_datadir}/opera/locale/te
258 #%lang(th) %{_datadir}/opera/locale/th
259 #%lang(tl) %{_datadir}/opera/locale/tl
260 %lang(tr) %{_datadir}/opera/locale/tr
261 %lang(uk) %{_datadir}/opera/locale/uk
262 #%lang(uz) %{_datadir}/opera/locale/uz
263 %lang(vi) %{_datadir}/opera/locale/vi
264 %lang(zh_CN) %{_datadir}/opera/locale/zh-cn
265 #%lang(zh_HK) %{_datadir}/opera/locale/zh-hk
266 %lang(zh_TW) %{_datadir}/opera/locale/zh-tw
267 %{_datadir}/mime/packages/opera-widget.xml
268 %{_datadir}/mime/packages/opera-unite-application.xml
269 %{_desktopdir}/*.desktop
270 %{_mandir}/man1/opera.1*
271 %{_mandir}/man1/opera-widget-manager.1*
272 #%{_pixmapsdir}/opera.xpm
273 %{_iconsdir}/hicolor/*/*/*.png
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_libdir}/opera/*-ia32-*