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 20070710
19 %define reltype %{nil}
27 %define dirrel 20060206
28 %define reltype Preview-2
29 %define magicstr %{nil}
34 %define dirrel 20070716
40 %define shver %(echo %{ver} | tr -d .)%{fix}
41 %define x86_shared_rel %{dirrel}.5
42 %define x86_static_rel %{dirrel}.1
43 %define sparc_shared_rel %{dirrel}.2
44 %define sparc_static_rel %{dirrel}.1
45 %define ppc_shared_rel %{dirrel}.3
46 %define ppc_static_rel %{dirrel}.1
49 # We should be able to build src.rpm also on not supported archs
50 %define rel %{x86_shared_rel}
52 #%%define rel %{sparc_shared_rel}
53 %define rel %{sparc_static_rel}
56 %define rel %{ppc_shared_rel}
61 %define rel %{x86_static_rel}
63 %define rel %{sparc_static_rel}
66 %define rel %{ppc_static_rel}
71 # define to 0 and then redefine to avoid
73 %define need_ix86_shared_snap 0
74 %define need_sparc_shared_snap 0
75 %define need_ppc_shared_snap 0
76 %define need_ix86_static_snap 0
77 %define need_sparc_static_snap 0
78 %define need_ppc_static_snap 0
80 %define need_ix86_shared 0
81 %define need_sparc_shared 0
82 %define need_ppc_shared 0
83 %define need_ix86_static 0
84 %define need_sparc_static 0
85 %define need_ppc_static 0
93 %define need_ix86_shared_snap 1
94 %define need_sparc_shared_snap 0
95 %define need_ppc_shared_snap 1
98 %define need_ix86_static_snap 1
99 %define need_sparc_static_snap 1
100 %define need_ppc_static_snap 1
102 # with shared; [endif]
107 %define need_ix86_shared 1
108 #%%define need_sparc_shared 1
109 %define need_sparc_static 1
110 %define need_ppc_shared 1
112 # with shared: [else]
113 %define need_ix86_static 1
114 %define need_sparc_static 1
115 %define need_ppc_static 1
117 # with shared; [endif]
121 # with incall: [else]
128 %define need_ix86_shared_snap 1
130 # with shared: [else]
131 %define need_ix86_static_snap 1
133 # with shared; [endif]
138 %define need_ix86_shared 1
140 # with shared: [else]
141 %define need_ix86_static 1
143 # with shared; [endif]
148 %ifarch sparc sparc64
154 %define need_sparc_shared_snap 1
156 # with shared: [else]
157 %define need_sparc_static_snap 1
159 # with shared; [endif]
164 #%%define need_sparc_shared 1
165 %define need_sparc_static 1
167 # with shared: [else]
168 %define need_sparc_static 1
170 # with shared; [endif]
181 %define need_ppc_shared_snap 1
183 # with shared: [else]
184 %define need_ppc_static_snap 1
186 # with shared; [endif]
191 %define need_ppc_shared 1
193 # with shared: [else]
194 %define need_ppc_static 1
196 # with shared; [endif]
206 # with incall; [endif]
209 %define need_ppc_shared_snap 0
210 %define need_ppc_static_snap 0
211 %define need_sparc_shared_snap 0
212 %define need_sparc_static_snap 0
216 Summary: World fastest web browser
217 Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
219 Version: %{ver}%{fix}
220 Release: %{?with_snap:1.%{rel}.}%{_rel}
222 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
223 Group: X11/Applications/Networking
225 %if %{need_ix86_static}
226 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
227 # Source0-md5: 601c923cfdc99ec57925e7cdc669ce48
228 %{!?with_distributable:NoSource: 0}
231 %if %{need_ix86_static_snap}
233 Source30100: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
235 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
237 %{!?with_distributable:NoSource: 100}
240 %if %{need_sparc_static}
241 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
242 # Source1-md5: 4eccc2443ef63a4354512ea3a2dd6776
243 %{!?with_distributable:NoSource: 1}
246 %if %{need_sparc_static_snap}
247 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
248 # Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1
249 %{!?with_distributable:NoSource: 101}
252 %if %{need_ppc_static}
253 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
254 # Source2-md5: 1ca7710dbbadf234981742b9a48ee72d
255 %{!?with_distributable:NoSource: 2}
258 %if %{need_ppc_static_snap}
260 Source30102: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
262 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
264 %{!?with_distributable:NoSource: 102}
267 %if %{need_ix86_shared}
268 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
269 # Source20-md5: 88cc6ea85bed0d875e9b6a52b63b5180
270 %{!?with_distributable:NoSource: 20}
273 %if %{need_ix86_shared_snap}
275 Source301020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
276 # Source301020-md5: ad79584af57b53574ef209120cc5db27
278 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
279 # Source1020-md5: 6f296be6b9fc3001588d4509016062bd
280 %{!?with_distributable:NoSource: 1020}
284 %if %{need_sparc_shared}
285 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
286 # Source21-md5: 883df8058672cf52678a07d714dcfce
287 %{!?with_distributable:NoSource: 21}
290 %if %{need_sparc_shared_snap}
291 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
292 # Source1021-md5: e190021f5530de3f711006cd9f6bb339
293 %{!?with_distributable:NoSource: 1021}
296 %if %{need_ppc_shared}
297 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
298 # Source22-md5: ef774f95c12d1d7f7cbcc1adfb77f2bb
299 %{!?with_distributable:NoSource: 22}
302 %if %{need_ppc_shared_snap}
304 Source301022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
305 # Source301022-md5: 65293d788e18d0c23cccac71b9fe567c
307 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
308 # Source1022-md5: 74985fa6da49b2e54c9d03dab1119325
309 %{!?with_distributable:NoSource: 1022}
313 Source4: %{name}.desktop
314 Patch0: %{name}-wrapper.patch
315 URL: http://www.opera.com/
316 BuildRequires: rpmbuild(macros) >= 1.356
317 BuildRequires: sed >= 4.0
318 Requires: browser-plugins >= 2.0
319 Requires: freetype >= 2
321 ExclusiveArch: %{ix86} ppc sparc sparcv9
322 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
324 %define _plugindir %{_libdir}/opera/plugins
325 %define _operadocdir %{_docdir}/%{name}-%{ver}
328 Opera is world fastest web browser. It supports most of nowaday
329 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
332 %description -l pl.UTF-8
333 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
334 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
335 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
339 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}}
341 %ifarch sparc sparcv9
342 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en%{?magicstr:-%{magicstr}}
345 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}}
350 rm -rf $RPM_BUILD_ROOT
351 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
353 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
354 # opera does not use for .xpt files
357 # use mplayerplug-in-opera instead
360 # opera uses libjava.so to run java
365 DESTDIR=$RPM_BUILD_ROOT \
366 --prefix=%{_prefix} \
367 --exec_prefix=%{_libdir}/opera/bin \
368 --docdir=%{_operadocdir}
370 # install in kde etc.
371 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
372 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
374 mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
377 rm -rf $RPM_BUILD_ROOT
380 %update_browser_plugins
383 if [ "$1" = 0 ]; then
384 %update_browser_plugins
388 %defattr(644,root,root,755)
390 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
393 %{_browserpluginsconfdir}/browsers.d/%{name}.*
394 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
396 %attr(755,root,root) %{_bindir}/*
397 %dir %{_libdir}/opera
398 %dir %{_libdir}/opera/bin
399 %attr(755,root,root) %{_libdir}/opera/bin/*
401 %attr(755,root,root) %{_plugindir}/*
402 %dir %{_datadir}/opera
403 %{_datadir}/opera/*.*
404 %{_datadir}/opera/images
405 %{_datadir}/opera/ini
406 %{_datadir}/opera/java
407 %{_datadir}/opera/skin
408 %{_datadir}/opera/styles
409 %dir %{_datadir}/opera/locale
410 %{_datadir}/opera/locale/en
411 %{_datadir}/opera/locale/english.lng
412 %{_desktopdir}/*.desktop
413 %{_mandir}/man1/opera.1*
414 %{_pixmapsdir}/opera.xpm