2 # - HEAD - stable version
3 # - DEVEL - development version
4 # - WEEKLY - weekly development version
7 # - move translations into a separate, noarch package
8 # - drop those dozens of if statements and use branches for different sources
9 # [ kestrel already on DEVEL ]
11 %bcond_without shared # static or shared version
12 %bcond_without distributable # distributable or not
13 %bcond_without incall # include all tarballs into src.rpm (but splitted into shared/static)
14 %bcond_with snap # snap version !DROPME!
15 %bcond_with weekly # weekly snapshot version !DROPME!
25 %define dirrel 20070809
26 %define reltype %{nil}
34 %define dirrel 20070903
35 %define reltype Alpha-1
41 %define dirrel 20070809
47 %define shver %(echo %{ver} | tr -d .)%{fix}
48 %define x86_shared_rel %{dirrel}.5
49 %define x86_static_rel %{dirrel}.1
50 %define sparc_shared_rel %{dirrel}.2
51 %define sparc_static_rel %{dirrel}.1
52 %define ppc_shared_rel %{dirrel}.3
53 %define ppc_static_rel %{dirrel}.1
56 # We should be able to build src.rpm also on not supported archs
57 %define rel %{x86_shared_rel}
59 #%%define rel %{sparc_shared_rel}
60 %define rel %{sparc_static_rel}
63 %define rel %{ppc_shared_rel}
68 %define rel %{x86_static_rel}
70 %define rel %{sparc_static_rel}
73 %define rel %{ppc_static_rel}
78 # define to 0 and then redefine to avoid
80 %define need_ix86_shared_snap 0
81 %define need_sparc_shared_snap 0
82 %define need_ppc_shared_snap 0
83 %define need_ix86_static_snap 0
84 %define need_sparc_static_snap 0
85 %define need_ppc_static_snap 0
87 %define need_ix86_shared 0
88 %define need_sparc_shared 0
89 %define need_ppc_shared 0
90 %define need_ix86_static 0
91 %define need_sparc_static 0
92 %define need_ppc_static 0
100 %define need_ix86_shared_snap 1
101 %define need_sparc_shared_snap 0
102 %define need_ppc_shared_snap 1
104 # with shared: [else]
105 %define need_ix86_static_snap 1
106 %define need_sparc_static_snap 1
107 %define need_ppc_static_snap 1
109 # with shared; [endif]
114 %define need_ix86_shared 1
115 #%%define need_sparc_shared 1
116 %define need_sparc_static 1
117 %define need_ppc_shared 1
119 # with shared: [else]
120 %define need_ix86_static 1
121 %define need_sparc_static 1
122 %define need_ppc_static 1
124 # with shared; [endif]
128 # with incall: [else]
135 %define need_ix86_shared_snap 1
137 # with shared: [else]
138 %define need_ix86_static_snap 1
140 # with shared; [endif]
145 %define need_ix86_shared 1
147 # with shared: [else]
148 %define need_ix86_static 1
150 # with shared; [endif]
155 %ifarch sparc sparc64
161 %define need_sparc_shared_snap 1
163 # with shared: [else]
164 %define need_sparc_static_snap 1
166 # with shared; [endif]
171 #%%define need_sparc_shared 1
172 %define need_sparc_static 1
174 # with shared: [else]
175 %define need_sparc_static 1
177 # with shared; [endif]
188 %define need_ppc_shared_snap 1
190 # with shared: [else]
191 %define need_ppc_static_snap 1
193 # with shared; [endif]
198 %define need_ppc_shared 1
200 # with shared: [else]
201 %define need_ppc_static 1
203 # with shared; [endif]
213 # with incall; [endif]
216 %define need_ppc_shared_snap 0
217 %define need_ppc_static_snap 0
218 %define need_sparc_shared_snap 0
219 %define need_sparc_static_snap 0
223 Summary: World fastest web browser
224 Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
226 Version: %{ver}%{fix}
227 Release: %{?with_snap:1.%{rel}.}%{_rel}
229 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
230 Group: X11/Applications/Networking
232 %if %{need_ix86_static}
233 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
234 # Source0-md5: 0c721abff854df6c8ec7746956a37f55
235 %{!?with_distributable:NoSource: 0}
238 %if %{need_ix86_static_snap}
240 Source30100: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
242 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
244 %{!?with_distributable:NoSource: 100}
247 %if %{need_sparc_static}
248 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
249 # Source1-md5: 98a84755df7d74812e8b8fa20d09d929
250 %{!?with_distributable:NoSource: 1}
253 %if %{need_sparc_static_snap}
254 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
255 # Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1
256 %{!?with_distributable:NoSource: 101}
259 %if %{need_ppc_static}
260 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
261 # Source2-md5: 132fa2d85a2e0c2840b8bf2d27cfc93d
262 %{!?with_distributable:NoSource: 2}
265 %if %{need_ppc_static_snap}
267 Source30102: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
269 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
271 %{!?with_distributable:NoSource: 102}
274 %if %{need_ix86_shared}
275 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
276 # Source20-md5: fe3c699c4509788276a94e325cd1bc5b
277 %{!?with_distributable:NoSource: 20}
280 %if %{need_ix86_shared_snap}
282 Source301020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
283 # Source301020-md5: fe3c699c4509788276a94e325cd1bc5b
285 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-%{magicstr}.tar.bz2
286 # Source1020-md5: 8655d3c4623db40076507f03987158ae
287 %{!?with_distributable:NoSource: 1020}
291 %if %{need_sparc_shared}
292 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
293 # Source21-md5: 883df8058672cf52678a07d714dcfce
294 %{!?with_distributable:NoSource: 21}
297 %if %{need_sparc_shared_snap}
298 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
299 # Source1021-md5: e190021f5530de3f711006cd9f6bb339
300 %{!?with_distributable:NoSource: 1021}
303 %if %{need_ppc_shared}
304 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
305 # Source22-md5: 2f9bf50540fac7ed63f2984a13b1010d
306 %{!?with_distributable:NoSource: 22}
309 %if %{need_ppc_shared_snap}
311 Source301022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
312 # Source301022-md5: 65293d788e18d0c23cccac71b9fe567c
314 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-%{magicstr}.tar.bz2
315 # Source1022-md5: 94b4d77cdcdf42a40ebe2d682892bb9a
316 %{!?with_distributable:NoSource: 1022}
321 Source23: http://snapshot.opera.com/unix/9.50-Alpha-1/x86_64-linux/%{name}-%{version}-%{dirrel}.2-shared-qt.x86_64-%{magicstr}.tar.bz2
322 # Source23-md5: 40b850632dbb729a0bb16a1c450d97e5
323 %{!?with_distributable:NoSource: 23}
326 Source4: %{name}.desktop
327 Patch0: %{name}-wrapper.patch
328 URL: http://www.opera.com/
329 BuildRequires: rpmbuild(macros) >= 1.356
330 BuildRequires: sed >= 4.0
331 Requires: browser-plugins >= 2.0
332 Requires: freetype >= 2
334 ExclusiveArch: %{ix86} %{x8664} ppc sparc sparcv9
335 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
337 %define _plugindir %{_libdir}/opera/plugins
338 %define _operadocdir %{_docdir}/%{name}-%{ver}
341 Opera is world fastest web browser. It supports most of nowaday
342 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
345 %description -l pl.UTF-8
346 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
347 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
348 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
352 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386%{!?with_snap:-en}%{?magicstr:-%{magicstr}}
355 %setup -q -T -b 23 -n %{name}-%{version}-%{dirrel}.2-shared-qt.x86_64-%{magicstr}
357 %ifarch sparc sparcv9
358 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc%{!?with_snap:-en}-en%{?magicstr:-%{magicstr}}
361 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{!?with_snap:-en}%{?magicstr:-%{magicstr}}
366 rm -rf $RPM_BUILD_ROOT
367 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
369 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
370 # opera does not use for .xpt files
373 # use mplayerplug-in-opera instead
376 # opera uses libjava.so to run java
381 DESTDIR=$RPM_BUILD_ROOT \
382 --prefix=%{_prefix} \
383 --exec_prefix=%{_libdir}/%{name}/bin \
384 --plugindir=%{_libdir}/%{name}/plugins \
385 --docdir=%{_operadocdir}
387 # install in kde etc.
388 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
391 install etc/* $RPM_BUILD_ROOT%{_sysconfdir}
392 install usr/share/pixmaps/*.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
394 mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
395 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
399 rm -rf $RPM_BUILD_ROOT
402 %update_browser_plugins
405 if [ "$1" = 0 ]; then
406 %update_browser_plugins
410 %defattr(644,root,root,755)
412 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
415 %{_browserpluginsconfdir}/browsers.d/%{name}.*
416 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
418 %attr(755,root,root) %{_bindir}/*
419 %dir %{_libdir}/opera
420 %dir %{_libdir}/opera/bin
421 %attr(755,root,root) %{_libdir}/opera/bin/*
424 %attr(755,root,root) %{_plugindir}/*
425 %{_datadir}/opera/images
427 %dir %{_datadir}/opera
428 %{_datadir}/opera/*.*
429 %{_datadir}/opera/ini
430 %{_datadir}/opera/java
431 %{_datadir}/opera/skin
432 %{_datadir}/opera/styles
433 %dir %{_datadir}/opera/locale
434 %{_datadir}/opera/locale/en
435 %{_datadir}/opera/locale/english.lng
436 %{_desktopdir}/*.desktop
437 %{_mandir}/man1/opera.1*
438 %{_pixmapsdir}/opera.xpm