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: e86d604b2f9397a618e8ecf357748f55
26 Source11: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.x86_64.linux.tar.bz2
27 # Source11-md5: 6415f21430bade3193d0d6c174e3bfb1
28 Source12: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.ppc.linux.tar.bz2
29 # Source12-md5: 4cd09b64a0d1c3826b3e7038326c14dc
30 Source0: %{name}.desktop
31 Patch0: %{name}-wrapper.patch
32 Patch1: %{name}-desktop.patch
33 Patch2: %{name}-pluginpath.patch
34 URL: http://www.opera.com/
35 BuildRequires: rpm >= 4.4.9-56
36 BuildRequires: rpmbuild(macros) >= 1.356
37 BuildRequires: sed >= 4.0
38 Requires: browser-plugins >= 2.0
39 Requires: freetype >= 2
42 ExclusiveArch: %{ix86} %{x8664} ppc
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 %define _enable_debug_packages 0
47 %define _plugindir %{_libdir}/opera/plugins
48 %define _operadocdir %{_docdir}/%{name}-%{ver}
49 # alternative arch for plugin32
53 Opera is world fastest web browser. It supports most of nowaday
54 extensions of HTML. And it is quite stable. This version is linked
55 with shared version of Qt.
57 %description -l hu.UTF-8
58 Opera a világ leggyorsabb webböngészője. A manapság elterjedt
59 HTML-kiterjesztések túlnyomó többségét támogatja. És elég stabili is.
60 Ez a verzió a Qt megosztott verziójához linkelődik.
62 %description -l pl.UTF-8
63 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
64 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
65 wersja jest skonsolidowana dynamicznie z Qt.
68 Summary: Opera 32-bit plugins support
69 Summary(hu.UTF-8): Opera 32-bites plugin támogatás
70 Summary(pl.UTF-8): Obsługa 32-bitowych wtyczek Opery
71 Group: X11/Applications/Networking
72 Requires: %{name} = %{epoch}:%{version}-%{release}
73 Requires: browser-plugins >= 2.0
76 Opera 32-bit plugins support.
78 %description plugin32 -l hu.UTF-8
79 Opera 32-bites plugin támogatás.
81 %description plugin32 -l pl.UTF-8
82 Obsługa 32-bitowych wtyczek Opery.
86 %setup -q -T -b 10 -n %{name}-%{version}-%{buildid}.i386.linux
90 %setup -q -T -b 11 -n %{name}-%{version}-%{buildid}.x86_64.linux
94 %setup -q -T -b 12 -n %{name}-%{version}-%{buildid}.ppc.linux
98 s,@@{PREFIX},%{_prefix},g
101 ' share/{applications/*.desktop,mime/packages/*.xml}
103 sed -i -e 's,kfmclient exec,xdg-open,' share/opera/defaults/filehandler.ini
108 # remove lib32/lib64 paths so patch2 can apply (i386 build contained lib64 as well, oh well)
109 %{__sed} -i -e '/lib32\|lib64/d;$d' share/opera/defaults/pluginpath.ini
112 mv lib/opera/plugins/README README.plugins
113 mv share/opera/defaults/license.txt .
114 mv share/doc/opera/* .
116 # nobody wants scalable huge icons
117 rm -rf share/icons/hicolor/scalable
119 # opera packaging tools we don't need runtime
120 mv share/opera/package .
123 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir},%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
126 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
127 # opera does not use for .xpt files
130 # use mplayerplug-in-opera instead
134 install -p opera* $RPM_BUILD_ROOT%{_bindir}
135 cp -a lib/opera $RPM_BUILD_ROOT%{_libdir}
136 cp -a share/* $RPM_BUILD_ROOT%{_datadir}
137 #cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir}
139 sed -i -e 's#/usr/lib/opera#%{_libdir}/opera#g' $RPM_BUILD_ROOT%{_bindir}/opera
141 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/operaprefs_default.ini
146 %if "%{pld_release}" == "ti"
147 sed -i -e 's#DISTRO#PLD/Titanium#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
149 %if "%{pld_release}" == "ac"
150 sed -i -e 's#DISTRO#PLD/2.0 (Ac)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
152 sed -i -e 's#DISTRO#PLD/3.0 (Th)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
157 rm -rf $RPM_BUILD_ROOT
160 %update_mime_database
161 %update_icon_cache hicolor
162 %update_desktop_database_post
163 %update_browser_plugins
166 %update_mime_database
167 %update_icon_cache hicolor
168 %update_desktop_database_postun
169 if [ "$1" = 0 ]; then
170 %update_browser_plugins
174 %update_browser_plugins
177 if [ "$1" = 0 ]; then
178 %update_browser_plugins
182 %defattr(644,root,root,755)
184 #%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini
187 %{_browserpluginsconfdir}/browsers.d/%{name}.*
188 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
189 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/operaprefs*.ini
190 %attr(755,root,root) %{_bindir}/opera
191 %attr(755,root,root) %{_bindir}/opera-widget-manager
192 %dir %{_libdir}/opera
194 %exclude %{_libdir}/opera/*-ia32-*
196 %attr(755,root,root) %{_libdir}/opera/*.so
197 %attr(755,root,root) %{_libdir}/opera/opera*
199 %dir %{_libdir}/opera/gstreamer
200 %dir %{_libdir}/opera/gstreamer/plugins
201 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperamatroska.so
202 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperavp8.so
203 %dir %{_datadir}/opera
204 %{_datadir}/opera/*.*
205 %{_datadir}/opera/defaults
206 %{_datadir}/opera/extra
207 %{_datadir}/opera/skin
208 %{_datadir}/opera/styles
210 %{_datadir}/opera/unite
211 %dir %{_datadir}/opera/locale
212 %{_datadir}/opera/locale/en
213 %lang(be) %{_datadir}/opera/locale/be
214 %lang(bg) %{_datadir}/opera/locale/bg
215 %lang(cs) %{_datadir}/opera/locale/cs
216 %lang(da) %{_datadir}/opera/locale/da
217 %lang(de) %{_datadir}/opera/locale/de
218 %lang(el) %{_datadir}/opera/locale/el
219 %lang(en_GB) %{_datadir}/opera/locale/en-GB
220 %lang(es_ES) %{_datadir}/opera/locale/es-ES
221 %lang(es_LA) %{_datadir}/opera/locale/es-LA
222 %lang(et) %{_datadir}/opera/locale/et
223 %lang(fi) %{_datadir}/opera/locale/fi
224 %lang(fr) %{_datadir}/opera/locale/fr
225 %lang(fr_CA) %{_datadir}/opera/locale/fr-CA
226 %lang(fy) %{_datadir}/opera/locale/fy
227 %lang(hi) %{_datadir}/opera/locale/hi
228 %lang(hr) %{_datadir}/opera/locale/hr
229 %lang(hu) %{_datadir}/opera/locale/hu
230 %lang(id) %{_datadir}/opera/locale/id
231 %lang(it) %{_datadir}/opera/locale/it
232 %lang(ja) %{_datadir}/opera/locale/ja
233 %lang(ka) %{_datadir}/opera/locale/ka
234 %lang(ko) %{_datadir}/opera/locale/ko
235 %lang(lt) %{_datadir}/opera/locale/lt
236 %lang(mk) %{_datadir}/opera/locale/mk
237 %lang(nb) %{_datadir}/opera/locale/nb
238 %lang(nl) %{_datadir}/opera/locale/nl
239 %lang(nn) %{_datadir}/opera/locale/nn
240 %lang(pl) %{_datadir}/opera/locale/pl
241 %lang(pt) %{_datadir}/opera/locale/pt
242 %lang(pt_BR) %{_datadir}/opera/locale/pt-BR
243 %lang(ro) %{_datadir}/opera/locale/ro
244 %lang(ru) %{_datadir}/opera/locale/ru
245 %lang(sk) %{_datadir}/opera/locale/sk
246 %lang(sr) %{_datadir}/opera/locale/sr
247 %lang(sv) %{_datadir}/opera/locale/sv
248 %lang(ta) %{_datadir}/opera/locale/ta
249 %lang(te) %{_datadir}/opera/locale/te
250 %lang(tr) %{_datadir}/opera/locale/tr
251 %lang(uk) %{_datadir}/opera/locale/uk
252 %lang(vi) %{_datadir}/opera/locale/vi
253 %lang(zh_CN) %{_datadir}/opera/locale/zh-cn
254 %lang(zh_HK) %{_datadir}/opera/locale/zh-hk
255 %lang(zh_TW) %{_datadir}/opera/locale/zh-tw
256 %{_datadir}/mime/packages/opera-widget.xml
257 %{_datadir}/mime/packages/opera-unite-application.xml
258 %{_desktopdir}/*.desktop
259 %{_mandir}/man1/opera.1*
260 %{_mandir}/man1/opera-widget-manager.1*
261 %{_iconsdir}/hicolor/*/*/*.png
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_libdir}/opera/*-ia32-*