2 # - move translations into a separate, noarch package
4 %bcond_without shared # static or shared version
5 %bcond_without distributable # distributable or not
6 %bcond_without incall # include all tarballs into src.rpm (but splitted into shared/static)
7 %bcond_with snap # snap version
8 %bcond_with weekly # weekly snapshot version
18 %define dirrel 20070228
26 %define dirrel 20060206
27 %define reltype Preview-2
28 %define magicstr %{nil}
33 %define dirrel 20061214
39 %define shver %(echo %{ver} | tr -d .)%{fix}
40 %define x86_shared_rel %{dirrel}.5
41 %define x86_static_rel %{dirrel}.1
42 %define sparc_shared_rel %{dirrel}.2
43 %define sparc_static_rel %{dirrel}.1
44 %define ppc_shared_rel %{dirrel}.3
45 %define ppc_static_rel %{dirrel}.1
48 # We should be able to build src.rpm also on not supported archs
49 %define rel %{x86_shared_rel}
51 #%%define rel %{sparc_shared_rel}
52 %define rel %{sparc_static_rel}
55 %define rel %{ppc_shared_rel}
60 %define rel %{x86_static_rel}
62 %define rel %{sparc_static_rel}
65 %define rel %{ppc_static_rel}
70 # define to 0 and then redefine to avoid
72 %define need_ix86_shared_snap 0
73 %define need_sparc_shared_snap 0
74 %define need_ppc_shared_snap 0
75 %define need_ix86_static_snap 0
76 %define need_sparc_static_snap 0
77 %define need_ppc_static_snap 0
79 %define need_ix86_shared 0
80 %define need_sparc_shared 0
81 %define need_ppc_shared 0
82 %define need_ix86_static 0
83 %define need_sparc_static 0
84 %define need_ppc_static 0
92 %define need_ix86_shared_snap 1
93 %define need_sparc_shared_snap 0
94 %define need_ppc_shared_snap 1
97 %define need_ix86_static_snap 1
98 %define need_sparc_static_snap 1
99 %define need_ppc_static_snap 1
101 # with shared; [endif]
106 %define need_ix86_shared 1
107 #%%define need_sparc_shared 1
108 %define need_sparc_static 1
109 %define need_ppc_shared 1
111 # with shared: [else]
112 %define need_ix86_static 1
113 %define need_sparc_static 1
114 %define need_ppc_static 1
116 # with shared; [endif]
120 # with incall: [else]
127 %define need_ix86_shared_snap 1
129 # with shared: [else]
130 %define need_ix86_static_snap 1
132 # with shared; [endif]
137 %define need_ix86_shared 1
139 # with shared: [else]
140 %define need_ix86_static 1
142 # with shared; [endif]
147 %ifarch sparc sparc64
153 %define need_sparc_shared_snap 1
155 # with shared: [else]
156 %define need_sparc_static_snap 1
158 # with shared; [endif]
163 #%%define need_sparc_shared 1
164 %define need_sparc_static 1
166 # with shared: [else]
167 %define need_sparc_static 1
169 # with shared; [endif]
180 %define need_ppc_shared_snap 1
182 # with shared: [else]
183 %define need_ppc_static_snap 1
185 # with shared; [endif]
190 %define need_ppc_shared 1
192 # with shared: [else]
193 %define need_ppc_static 1
195 # with shared; [endif]
205 # with incall; [endif]
208 %define need_ppc_shared_snap 0
209 %define need_ppc_static_snap 0
210 %define need_sparc_shared_snap 0
211 %define need_sparc_static_snap 0
215 Summary: World fastest web browser
216 Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
218 Version: %{ver}%{fix}
219 Release: %{?with_snap:1.%{rel}.}%{_rel}
221 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
222 Group: X11/Applications/Networking
224 %if %{need_ix86_static}
225 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
226 # Source0-md5: dccdc5252ffc6658f3c46f32c64c8219
227 %{!?with_distributable:NoSource: 0}
230 %if %{need_ix86_static_snap}
232 Source30100: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
234 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
236 %{!?with_distributable:NoSource: 100}
239 %if %{need_sparc_static}
240 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
241 # Source1-md5: e7bcbbaa48a63827d0efc60cf6fef68d
242 %{!?with_distributable:NoSource: 1}
245 %if %{need_sparc_static_snap}
246 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
247 # Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1
248 %{!?with_distributable:NoSource: 101}
251 %if %{need_ppc_static}
252 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
253 # Source2-md5: d67428a09a036e786efc22e03150a344
254 %{!?with_distributable:NoSource: 2}
257 %if %{need_ppc_static_snap}
259 Source30102: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
261 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
263 %{!?with_distributable:NoSource: 102}
266 %if %{need_ix86_shared}
267 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
268 # Source20-md5: a60b0abe55ca580952b30f4540632425
269 %{!?with_distributable:NoSource: 20}
272 %if %{need_ix86_shared_snap}
274 Source301020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
275 # Source301020-md5: d688cee8c7c038be9c85588bc8182c02
277 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
278 # Source1020-md5: 6f296be6b9fc3001588d4509016062bd
279 %{!?with_distributable:NoSource: 1020}
283 %if %{need_sparc_shared}
284 Source21: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/shared/gcc-2.95/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
285 # Source21-md5: 883df8058672cf52678a07d714dcfce
286 %{!?with_distributable:NoSource: 21}
289 %if %{need_sparc_shared_snap}
290 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
291 # Source1021-md5: e190021f5530de3f711006cd9f6bb339
292 %{!?with_distributable:NoSource: 1021}
295 %if %{need_ppc_shared}
296 Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/gcc-2.95/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
297 # Source22-md5: 6ef04f12a39fdbe671dfbd6a37080a81
298 %{!?with_distributable:NoSource: 22}
301 %if %{need_ppc_shared_snap}
303 Source301022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
304 # Source301022-md5: 65293d788e18d0c23cccac71b9fe567c
306 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
307 # Source1022-md5: 74985fa6da49b2e54c9d03dab1119325
308 %{!?with_distributable:NoSource: 1022}
312 Source4: %{name}.desktop
313 Patch0: %{name}-wrapper.patch
314 URL: http://www.opera.com/
315 BuildRequires: rpmbuild(macros) >= 1.356
316 BuildRequires: sed >= 4.0
317 Requires: browser-plugins >= 2.0
318 Requires: freetype >= 2
320 ExclusiveArch: %{ix86} ppc sparc sparc64
321 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
323 %define _plugindir %{_libdir}/opera/plugins
324 %define _operadocdir %{_docdir}/%{name}-%{ver}
327 Opera is world fastest web browser. It supports most of nowaday
328 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
331 %description -l pl.UTF-8
332 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
333 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
334 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
338 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}}
340 %ifarch sparc sparc64
341 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en%{?magicstr:-%{magicstr}}
344 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}}
349 rm -rf $RPM_BUILD_ROOT
350 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
352 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
353 # opera does not use for .xpt files
356 # use mplayerplug-in-opera instead
359 # opera uses libjava.so to run java
364 DESTDIR=$RPM_BUILD_ROOT \
365 --prefix=%{_prefix} \
366 --exec_prefix=%{_libdir}/opera/bin \
367 --docdir=%{_operadocdir}
369 # install in kde etc.
370 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
371 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
373 mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
376 rm -rf $RPM_BUILD_ROOT
379 %update_browser_plugins
382 if [ "$1" = 0 ]; then
383 %update_browser_plugins
387 %defattr(644,root,root,755)
389 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
392 %{_browserpluginsconfdir}/browsers.d/%{name}.*
393 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
395 %attr(755,root,root) %{_bindir}/*
396 %dir %{_libdir}/opera
397 %dir %{_libdir}/opera/bin
398 %attr(755,root,root) %{_libdir}/opera/bin/*
400 %attr(755,root,root) %{_plugindir}/*
401 %dir %{_datadir}/opera
402 %{_datadir}/opera/*.*
403 %{_datadir}/opera/images
404 %{_datadir}/opera/ini
405 %{_datadir}/opera/java
406 %{_datadir}/opera/skin
407 %{_datadir}/opera/styles
408 %dir %{_datadir}/opera/locale
409 %{_datadir}/opera/locale/en
410 %{_datadir}/opera/locale/english.lng
411 %{_desktopdir}/*.desktop
412 %{_mandir}/man1/opera.1*
413 %{_pixmapsdir}/opera.xpm