2 # - move translations into a separate, noarch package
3 # - add kestrel (snap) x86_64 version (yes, it's available)
5 %bcond_without shared # static or shared version
6 %bcond_without distributable # distributable or not
7 %bcond_without incall # include all tarballs into src.rpm (but splitted into shared/static)
8 %bcond_with snap # snap version
9 %bcond_with weekly # weekly snapshot version
19 %define dirrel 20070809
20 %define reltype %{nil}
28 %define dirrel 20070903
29 %define reltype Alpha-1
35 %define dirrel 20070809
41 %define shver %(echo %{ver} | tr -d .)%{fix}
42 %define x86_shared_rel %{dirrel}.5
43 %define x86_static_rel %{dirrel}.1
44 %define sparc_shared_rel %{dirrel}.2
45 %define sparc_static_rel %{dirrel}.1
46 %define ppc_shared_rel %{dirrel}.3
47 %define ppc_static_rel %{dirrel}.1
50 # We should be able to build src.rpm also on not supported archs
51 %define rel %{x86_shared_rel}
53 #%%define rel %{sparc_shared_rel}
54 %define rel %{sparc_static_rel}
57 %define rel %{ppc_shared_rel}
62 %define rel %{x86_static_rel}
64 %define rel %{sparc_static_rel}
67 %define rel %{ppc_static_rel}
72 # define to 0 and then redefine to avoid
74 %define need_ix86_shared_snap 0
75 %define need_sparc_shared_snap 0
76 %define need_ppc_shared_snap 0
77 %define need_ix86_static_snap 0
78 %define need_sparc_static_snap 0
79 %define need_ppc_static_snap 0
81 %define need_ix86_shared 0
82 %define need_sparc_shared 0
83 %define need_ppc_shared 0
84 %define need_ix86_static 0
85 %define need_sparc_static 0
86 %define need_ppc_static 0
94 %define need_ix86_shared_snap 1
95 %define need_sparc_shared_snap 0
96 %define need_ppc_shared_snap 1
99 %define need_ix86_static_snap 1
100 %define need_sparc_static_snap 1
101 %define need_ppc_static_snap 1
103 # with shared; [endif]
108 %define need_ix86_shared 1
109 #%%define need_sparc_shared 1
110 %define need_sparc_static 1
111 %define need_ppc_shared 1
113 # with shared: [else]
114 %define need_ix86_static 1
115 %define need_sparc_static 1
116 %define need_ppc_static 1
118 # with shared; [endif]
122 # with incall: [else]
129 %define need_ix86_shared_snap 1
131 # with shared: [else]
132 %define need_ix86_static_snap 1
134 # with shared; [endif]
139 %define need_ix86_shared 1
141 # with shared: [else]
142 %define need_ix86_static 1
144 # with shared; [endif]
149 %ifarch sparc sparc64
155 %define need_sparc_shared_snap 1
157 # with shared: [else]
158 %define need_sparc_static_snap 1
160 # with shared; [endif]
165 #%%define need_sparc_shared 1
166 %define need_sparc_static 1
168 # with shared: [else]
169 %define need_sparc_static 1
171 # with shared; [endif]
182 %define need_ppc_shared_snap 1
184 # with shared: [else]
185 %define need_ppc_static_snap 1
187 # with shared; [endif]
192 %define need_ppc_shared 1
194 # with shared: [else]
195 %define need_ppc_static 1
197 # with shared; [endif]
207 # with incall; [endif]
210 %define need_ppc_shared_snap 0
211 %define need_ppc_static_snap 0
212 %define need_sparc_shared_snap 0
213 %define need_sparc_static_snap 0
217 Summary: World fastest web browser
218 Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
220 Version: %{ver}%{fix}
221 Release: %{?with_snap:1.%{rel}.}%{_rel}
223 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
224 Group: X11/Applications/Networking
226 %if %{need_ix86_static}
227 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
228 # Source0-md5: 0c721abff854df6c8ec7746956a37f55
229 %{!?with_distributable:NoSource: 0}
232 %if %{need_ix86_static_snap}
234 Source30100: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
236 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
238 %{!?with_distributable:NoSource: 100}
241 %if %{need_sparc_static}
242 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
243 # Source1-md5: 98a84755df7d74812e8b8fa20d09d929
244 %{!?with_distributable:NoSource: 1}
247 %if %{need_sparc_static_snap}
248 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
249 # Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1
250 %{!?with_distributable:NoSource: 101}
253 %if %{need_ppc_static}
254 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
255 # Source2-md5: 132fa2d85a2e0c2840b8bf2d27cfc93d
256 %{!?with_distributable:NoSource: 2}
259 %if %{need_ppc_static_snap}
261 Source30102: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
263 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
265 %{!?with_distributable:NoSource: 102}
268 %if %{need_ix86_shared}
269 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
270 # Source20-md5: fe3c699c4509788276a94e325cd1bc5b
271 %{!?with_distributable:NoSource: 20}
274 %if %{need_ix86_shared_snap}
276 Source301020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
277 # Source301020-md5: fe3c699c4509788276a94e325cd1bc5b
279 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-%{magicstr}.tar.bz2
280 # Source1020-md5: 8655d3c4623db40076507f03987158ae
281 %{!?with_distributable:NoSource: 1020}
285 %if %{need_sparc_shared}
286 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
287 # Source21-md5: 883df8058672cf52678a07d714dcfce
288 %{!?with_distributable:NoSource: 21}
291 %if %{need_sparc_shared_snap}
292 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
293 # Source1021-md5: e190021f5530de3f711006cd9f6bb339
294 %{!?with_distributable:NoSource: 1021}
297 %if %{need_ppc_shared}
298 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
299 # Source22-md5: 2f9bf50540fac7ed63f2984a13b1010d
300 %{!?with_distributable:NoSource: 22}
303 %if %{need_ppc_shared_snap}
305 Source301022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
306 # Source301022-md5: 65293d788e18d0c23cccac71b9fe567c
308 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-%{magicstr}.tar.bz2
309 # Source1022-md5: 94b4d77cdcdf42a40ebe2d682892bb9a
310 %{!?with_distributable:NoSource: 1022}
314 Source4: %{name}.desktop
315 Patch0: %{name}-wrapper.patch
316 URL: http://www.opera.com/
317 BuildRequires: rpmbuild(macros) >= 1.356
318 BuildRequires: sed >= 4.0
319 Requires: browser-plugins >= 2.0
320 Requires: freetype >= 2
322 ExclusiveArch: %{ix86} ppc sparc sparcv9
323 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
325 %define _plugindir %{_libdir}/opera/plugins
326 %define _operadocdir %{_docdir}/%{name}-%{ver}
329 Opera is world fastest web browser. It supports most of nowaday
330 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
333 %description -l pl.UTF-8
334 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
335 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
336 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
340 %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}}
342 %ifarch sparc sparcv9
343 %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}}
346 %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}}
351 rm -rf $RPM_BUILD_ROOT
352 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
354 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
355 # opera does not use for .xpt files
358 # use mplayerplug-in-opera instead
361 # opera uses libjava.so to run java
366 DESTDIR=$RPM_BUILD_ROOT \
367 --prefix=%{_prefix} \
368 --exec_prefix=%{_libdir}/opera/bin \
369 --docdir=%{_operadocdir}
371 # install in kde etc.
372 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
375 install etc/* $RPM_BUILD_ROOT%{_sysconfdir}
376 install usr/share/pixmaps/*.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
378 mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
379 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
383 rm -rf $RPM_BUILD_ROOT
386 %update_browser_plugins
389 if [ "$1" = 0 ]; then
390 %update_browser_plugins
394 %defattr(644,root,root,755)
396 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
399 %{_browserpluginsconfdir}/browsers.d/%{name}.*
400 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
402 %attr(755,root,root) %{_bindir}/*
403 %dir %{_libdir}/opera
404 %dir %{_libdir}/opera/bin
405 %attr(755,root,root) %{_libdir}/opera/bin/*
408 %attr(755,root,root) %{_plugindir}/*
409 %{_datadir}/opera/images
411 %dir %{_datadir}/opera
412 %{_datadir}/opera/*.*
413 %{_datadir}/opera/ini
414 %{_datadir}/opera/java
415 %{_datadir}/opera/skin
416 %{_datadir}/opera/styles
417 %dir %{_datadir}/opera/locale
418 %{_datadir}/opera/locale/en
419 %{_datadir}/opera/locale/english.lng
420 %{_desktopdir}/*.desktop
421 %{_mandir}/man1/opera.1*
422 %{_pixmapsdir}/opera.xpm