2 # - HEAD - stable version
3 # - DEVEL - development version
4 # - WEEKLY - weekly development version (sometimes it's on DEVEL)
6 %bcond_without shared # static or shared version
7 %bcond_without distributable # distributable or not
8 %bcond_with snap # snap version
9 %bcond_with weekly # weekly snapshot version
12 %define reltype snapshot
16 %define shver %(echo %{ver} | tr -d .)
17 %define sreltype %(echo %{reltype} | tr - _)
19 # http://my.opera.com/csant/blog/2007/09/06/which-is-which
20 # http://my.opera.com/csant/blog/2008/05/20/which-is-which-part-two
21 %define x86_shared_rel gcc4-shared-qt3
22 %define x86_static_rel gcc4-qt4
23 %define sparc_shared_rel unknown
24 %define sparc_static_rel unknown
25 %define ppc_shared_rel gcc4-shared-qt3
26 %define ppc_static_rel gcc295-static-qt3
27 %define x86_64_shared_rel gcc4-shared-qt3
28 %define x86_64_static_rel unknown
34 # Defined to be able to build src.rpm also on not supported archs
35 %define rawrel %{x86_shared_rel}
38 %define rawrel %{sparc_shared_rel}
42 %define rawrel %{ppc_shared_rel}
46 %define rawrel %{x86_64_shared_rel}
53 # Defined to be able to build src.rpm also on not supported archs
54 %define rawrel %{x86_static_rel}
57 %define rawrel %{sparc_static_rel}
61 %define rawrel %{ppc_static_rel}
65 %define rawrel %{x86_64_static_rel}
68 %endif # [with shared]
70 %define rel %(echo %{rawrel} | tr - _)
73 Summary: World fastest web browser
74 Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
77 Release: 0.%{?magicstr:%{magicstr}.}%{rel}.%{_rel}.%{sreltype}
79 License: Distributable
80 Group: X11/Applications/Networking
82 Source0: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/intel-linux/%{name}-%{sver}-%{magicstr}.%{x86_shared_rel}.i386.tar.bz2
83 # Source0-md5: 6bd26d0d6aa28dde514ea5469ca5734e
84 %{!?with_distributable:NoSource: 0}
86 #Source1: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/sparc-linux/%{name}-%{sver}-%{magicstr}.%{sparc_shared_rel}-shared-qt.sparc.tar.bz2
87 ## Source1-md5: 913ccb28106f9f5acd3d94c8dc71ae1
88 #%{!?with_distributable:NoSource: 1}
90 Source2: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/ppc-linux/%{name}-%{sver}-%{magicstr}.%{ppc_shared_rel}.ppc.tar.bz2
91 # Source2-md5: e105411f31fc38d92f5894b366c652ae
92 %{!?with_distributable:NoSource: 2}
94 #Source3: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/x86_64-linux/%{name}-%{sver}-%{magicstr}.%{x86_64_shared_rel}.x86_64.tar.bz2
95 # Source3-md5: a13778ebd81beab3503fb4a539140581
96 #%{!?with_distributable:NoSource: 3}
98 Source10: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/intel-linux/%{name}-%{sver}-%{magicstr}.%{x86_static_rel}.i386.tar.bz2
99 # Source10-md5: dd13f3f1854ad1f6c8af627203241ff6
100 %{!?with_distributable:NoSource: 10}
102 #Source11: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/sparc-linux/%{name}-%{sver}-%{magicstr}.%{sparc_static_rel}.sparc.tar.bz2
103 ## Source11-md5: e190021f5530de3f711006cd9f6bb339
104 #%{!?with_distributable:NoSource: 11}
106 #Source12: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/ppc-linux/%{name}-%{sver}-%{magicstr}.%{ppc_static_rel}.ppc.tar.bz2
107 ## Source12-md5: 59c2f6f710c2efabeac9e153fa934743
108 #%{!?with_distributable:NoSource: 12}
110 #Source13: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/x86_64-linux/%{name}-%{sver}-%{magicstr}.%{x86_64_static_rel}.x86_64.tar.bz2
111 ## Source13-md5: 40b850632dbb729a0bb16a1c450d97e5
112 #%{!?with_distributable:NoSource: 13}
114 Source4: %{name}.desktop
115 Patch0: %{name}-wrapper.patch
116 URL: http://www.opera.com/
117 BuildRequires: rpmbuild(macros) >= 1.356
118 BuildRequires: sed >= 4.0
119 Requires: browser-plugins >= 2.0
120 Requires: freetype >= 2
122 Obsoletes: opera-i18n
123 ExclusiveArch: %{ix86} %{x8664} ppc sparc sparcv9
124 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
126 %define _plugindir %{_libdir}/opera/plugins
127 %define _operadocdir %{_docdir}/%{name}-%{ver}
130 Opera is world fastest web browser. It supports most of nowaday
131 extensions of HTML. And it is quite stable. This version is
132 %{?with_shared:shared}%{!?with_shared:statically} linked with Qt.
134 %description -l pl.UTF-8
135 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
136 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
137 wersja jest skonsolidowana
138 %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
141 Summary: Opera 32-bit plugins support
142 Summary(pl.UTF-8): Obsługa 32-bitowych wtyczek Opery
143 Group: X11/Applications/Networking
144 Requires: %{name} = %{epoch}:%{version}-%{release}
146 %description plugin32
147 Opera 32-bit plugins support.
149 %description plugin32 -l pl.UTF-8
150 Obsługa 32-bitowych wtyczek Opery.
154 %setup -q -T -b %{!?with_shared:1}0 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.i386
157 %ifarch sparc sparcv9
158 %setup -q -T -b %{!?with_shared:1}1 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.sparc
162 %setup -q -T -b %{!?with_shared:1}2 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.ppc
166 %setup -q -T -b %{!?with_shared:1}3 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.x86_64
172 rm -rf $RPM_BUILD_ROOT
173 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
175 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
176 # opera does not use for .xpt files
179 # use mplayerplug-in-opera instead
182 # opera uses libjava.so to run java
187 DESTDIR=$RPM_BUILD_ROOT \
188 --prefix=%{_prefix} \
189 --exec_prefix=%{_libdir}/%{name}/bin \
190 --plugindir=%{_libdir}/%{name}/plugins \
191 --docdir=%{_operadocdir}
193 # install in kde etc.
194 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
196 install etc/* $RPM_BUILD_ROOT%{_sysconfdir}
197 install usr/share/pixmaps/*.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
200 rm -rf $RPM_BUILD_ROOT
203 %update_browser_plugins
206 if [ "$1" = 0 ]; then
207 %update_browser_plugins
211 %defattr(644,root,root,755)
213 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
216 %{_browserpluginsconfdir}/browsers.d/%{name}.*
217 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
219 %attr(755,root,root) %{_bindir}/*
220 %dir %{_libdir}/opera
221 %dir %{_libdir}/opera/bin
222 %attr(755,root,root) %{_libdir}/opera/bin/*
224 %exclude %{_libdir}/opera/bin/*-ia32-*
227 %dir %{_datadir}/opera
228 %{_datadir}/opera/*.*
229 %{_datadir}/opera/ini
230 %{_datadir}/opera/java
231 %{_datadir}/opera/skin
232 %{_datadir}/opera/styles
233 %dir %{_datadir}/opera/locale
234 %{_datadir}/opera/locale/en
235 %{_datadir}/opera/locale/english.lng
236 %lang(be) %{_datadir}/opera/locale/be
237 %lang(bg) %{_datadir}/opera/locale/bg
238 %lang(cs) %{_datadir}/opera/locale/cs
239 %lang(da) %{_datadir}/opera/locale/da
240 %lang(de) %{_datadir}/opera/locale/de
241 %lang(el) %{_datadir}/opera/locale/el
242 %lang(en_GB) %{_datadir}/opera/locale/en-GB
243 %lang(es_ES) %{_datadir}/opera/locale/es-ES
244 %lang(es_LA) %{_datadir}/opera/locale/es-LA
245 %lang(fi) %{_datadir}/opera/locale/fi
246 %lang(fr) %{_datadir}/opera/locale/fr
247 %lang(fr_CA) %{_datadir}/opera/locale/fr-CA
248 %lang(fy) %{_datadir}/opera/locale/fy
249 %lang(hi) %{_datadir}/opera/locale/hi
250 %lang(hr) %{_datadir}/opera/locale/hr
251 %lang(hu) %{_datadir}/opera/locale/hu
252 %lang(it) %{_datadir}/opera/locale/it
253 %lang(ja) %{_datadir}/opera/locale/ja
254 %lang(ka) %{_datadir}/opera/locale/ka
255 %lang(ko) %{_datadir}/opera/locale/ko
256 %lang(lt) %{_datadir}/opera/locale/lt
257 %lang(mk) %{_datadir}/opera/locale/mk
258 %lang(nb) %{_datadir}/opera/locale/nb
259 %lang(nl) %{_datadir}/opera/locale/nl
260 %lang(nn) %{_datadir}/opera/locale/nn
261 %lang(pl) %{_datadir}/opera/locale/pl
262 %lang(pt) %{_datadir}/opera/locale/pt
263 %lang(pt_BR) %{_datadir}/opera/locale/pt-BR
264 %lang(ru) %{_datadir}/opera/locale/ru
265 %lang(sv) %{_datadir}/opera/locale/sv
266 %lang(tr) %{_datadir}/opera/locale/tr
267 %lang(zh_CN) %{_datadir}/opera/locale/zh-cn
268 %lang(zh_TW) %{_datadir}/opera/locale/zh-tw
269 %{_desktopdir}/*.desktop
270 %{_mandir}/man1/opera.1*
271 %{_pixmapsdir}/opera.xpm
275 %defattr(644,root,root,755)
276 %attr(755,root,root) %{_libdir}/opera/bin/*-ia32-*