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.bz2
25 # Source10-md5: 5a52a8fad55eb281975dfacee25221e6
26 Source11: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.x86_64.linux.tar.bz2
27 # Source11-md5: a91579341ae8eb66bd0b6a60947a0fab
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
36 Requires: browser-plugins >= 2.0
37 Requires: desktop-file-utils
38 Requires: freetype >= 2
41 ExclusiveArch: %{ix86} %{x8664} ppc
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 %define _enable_debug_packages 0
46 %define _plugindir %{_libdir}/opera/plugins
47 %define _operadocdir %{_docdir}/%{name}-%{ver}
48 # alternative arch for plugin32
52 Opera is world fastest web browser. It supports most of nowaday
53 extensions of HTML. And it is quite stable. This version is linked
54 with shared version of Qt.
56 %description -l hu.UTF-8
57 Opera a világ leggyorsabb webböngészője. A manapság elterjedt
58 HTML-kiterjesztések túlnyomó többségét támogatja. És elég stabili is.
59 Ez a verzió a Qt megosztott verziójához linkelődik.
61 %description -l pl.UTF-8
62 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
63 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
64 wersja jest skonsolidowana dynamicznie z Qt.
67 Summary: Opera 32-bit plugins support
68 Summary(hu.UTF-8): Opera 32-bites plugin támogatás
69 Summary(pl.UTF-8): Obsługa 32-bitowych wtyczek Opery
70 Group: X11/Applications/Networking
71 Requires: %{name} = %{epoch}:%{version}-%{release}
72 Requires: browser-plugins >= 2.0
75 Opera 32-bit plugins support.
77 %description plugin32 -l hu.UTF-8
78 Opera 32-bites plugin támogatás.
80 %description plugin32 -l pl.UTF-8
81 Obsługa 32-bitowych wtyczek Opery.
85 %setup -q -T -b 10 -n %{name}-%{version}-%{buildid}.i386.linux
89 %setup -q -T -b 11 -n %{name}-%{version}-%{buildid}.x86_64.linux
93 s,@@{PREFIX},%{_prefix},g
96 ' share/{applications/*.desktop,mime/packages/*.xml}
98 sed -i -e 's,kfmclient exec,xdg-open,' share/opera/defaults/filehandler.ini
103 # remove lib32/lib64 paths so patch2 can apply (i386 build contained lib64 as well, oh well)
104 %{__sed} -i -e '/lib32\|lib64/d;$d' share/opera/defaults/pluginpath.ini
107 mv lib/opera/plugins/README README.plugins
108 mv share/opera/defaults/license.txt .
109 mv share/doc/opera/* .
111 # nobody wants scalable huge icons
112 rm -rf share/icons/hicolor/scalable
114 # opera packaging tools we don't need runtime
115 mv share/opera/package .
118 rm -rf $RPM_BUILD_ROOT
119 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir},%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
121 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
122 # opera does not use for .xpt files
125 # use mplayerplug-in-opera instead
129 install -p opera* $RPM_BUILD_ROOT%{_bindir}
130 cp -a lib/opera $RPM_BUILD_ROOT%{_libdir}
131 cp -a share/* $RPM_BUILD_ROOT%{_datadir}
132 #cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir}
134 sed -i -e 's#/usr/lib/opera#%{_libdir}/opera#g' $RPM_BUILD_ROOT%{_bindir}/opera
136 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/operaprefs_default.ini
141 %if "%{pld_release}" == "ti"
142 sed -i -e 's#DISTRO#PLD/Titanium#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
144 %if "%{pld_release}" == "ac"
145 sed -i -e 's#DISTRO#PLD/2.0 (Ac)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
147 sed -i -e 's#DISTRO#PLD/3.0 (Th)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
152 rm -rf $RPM_BUILD_ROOT
155 %update_mime_database
156 %update_icon_cache hicolor
157 %update_desktop_database_post
158 %update_browser_plugins
161 %update_mime_database
162 %update_icon_cache hicolor
163 %update_desktop_database_postun
164 if [ "$1" = 0 ]; then
165 %update_browser_plugins
169 %update_browser_plugins
172 if [ "$1" = 0 ]; then
173 %update_browser_plugins
177 %defattr(644,root,root,755)
179 #%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini
182 %{_browserpluginsconfdir}/browsers.d/%{name}.*
183 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
184 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/operaprefs*.ini
185 %attr(755,root,root) %{_bindir}/opera
186 %attr(755,root,root) %{_bindir}/opera-widget-manager
187 %dir %{_libdir}/opera
189 %exclude %{_libdir}/opera/*-ia32-*
191 %attr(755,root,root) %{_libdir}/opera/*.so
192 %attr(755,root,root) %{_libdir}/opera/opera*
194 %dir %{_libdir}/opera/gstreamer
195 %dir %{_libdir}/opera/gstreamer/plugins
196 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperamatroska.so
197 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperavp8.so
198 %dir %{_datadir}/opera
199 %{_datadir}/opera/*.*
200 %{_datadir}/opera/defaults
201 %{_datadir}/opera/extra
202 %{_datadir}/opera/skin
203 %{_datadir}/opera/styles
205 %{_datadir}/opera/unite
206 %dir %{_datadir}/opera/locale
207 %{_datadir}/opera/locale/en
208 %lang(be) %{_datadir}/opera/locale/be
209 %lang(bg) %{_datadir}/opera/locale/bg
210 %lang(cs) %{_datadir}/opera/locale/cs
211 %lang(da) %{_datadir}/opera/locale/da
212 %lang(de) %{_datadir}/opera/locale/de
213 %lang(el) %{_datadir}/opera/locale/el
214 %lang(en_GB) %{_datadir}/opera/locale/en-GB
215 %lang(es_ES) %{_datadir}/opera/locale/es-ES
216 %lang(es_LA) %{_datadir}/opera/locale/es-LA
217 %lang(et) %{_datadir}/opera/locale/et
218 %lang(fi) %{_datadir}/opera/locale/fi
219 %lang(fr) %{_datadir}/opera/locale/fr
220 %lang(fr_CA) %{_datadir}/opera/locale/fr-CA
221 %lang(fy) %{_datadir}/opera/locale/fy
222 %lang(hi) %{_datadir}/opera/locale/hi
223 %lang(hr) %{_datadir}/opera/locale/hr
224 %lang(hu) %{_datadir}/opera/locale/hu
225 %lang(id) %{_datadir}/opera/locale/id
226 %lang(it) %{_datadir}/opera/locale/it
227 %lang(ja) %{_datadir}/opera/locale/ja
228 %lang(ka) %{_datadir}/opera/locale/ka
229 %lang(ko) %{_datadir}/opera/locale/ko
230 %lang(lt) %{_datadir}/opera/locale/lt
231 %lang(mk) %{_datadir}/opera/locale/mk
232 %lang(nb) %{_datadir}/opera/locale/nb
233 %lang(nl) %{_datadir}/opera/locale/nl
234 %lang(nn) %{_datadir}/opera/locale/nn
235 %lang(pl) %{_datadir}/opera/locale/pl
236 %lang(pt) %{_datadir}/opera/locale/pt
237 %lang(pt_BR) %{_datadir}/opera/locale/pt-BR
238 %lang(ro) %{_datadir}/opera/locale/ro
239 %lang(ru) %{_datadir}/opera/locale/ru
240 %lang(sk) %{_datadir}/opera/locale/sk
241 %lang(sr) %{_datadir}/opera/locale/sr
242 %lang(sv) %{_datadir}/opera/locale/sv
243 %lang(ta) %{_datadir}/opera/locale/ta
244 %lang(te) %{_datadir}/opera/locale/te
245 %lang(tr) %{_datadir}/opera/locale/tr
246 %lang(uk) %{_datadir}/opera/locale/uk
247 %lang(vi) %{_datadir}/opera/locale/vi
248 %lang(zh_CN) %{_datadir}/opera/locale/zh-cn
249 %lang(zh_HK) %{_datadir}/opera/locale/zh-hk
250 %lang(zh_TW) %{_datadir}/opera/locale/zh-tw
251 %{_datadir}/mime/packages/opera-widget.xml
252 %{_datadir}/mime/packages/opera-unite-application.xml
253 %{_desktopdir}/*.desktop
254 %{_mandir}/man1/opera.1*
255 %{_mandir}/man1/opera-widget-manager.1*
256 %{_iconsdir}/hicolor/*/*/*.png
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_libdir}/opera/*-ia32-*