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 20061214
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}
59 %define rel %{x86_static_rel}
61 %define rel %{sparc_static_rel}
64 %define rel %{ppc_static_rel}
68 # define to 0 and then redefine to avoid
70 %define need_ix86_shared_snap 0
71 %define need_sparc_shared_snap 0
72 %define need_ppc_shared_snap 0
73 %define need_ix86_static_snap 0
74 %define need_sparc_static_snap 0
75 %define need_ppc_static_snap 0
77 %define need_ix86_shared 0
78 %define need_sparc_shared 0
79 %define need_ppc_shared 0
80 %define need_ix86_static 0
81 %define need_sparc_static 0
82 %define need_ppc_static 0
90 %define need_ix86_shared_snap 1
91 %define need_sparc_shared_snap 0
92 %define need_ppc_shared_snap 1
95 %define need_ix86_static_snap 1
96 %define need_sparc_static_snap 1
97 %define need_ppc_static_snap 1
99 # with shared; [endif]
104 %define need_ix86_shared 1
105 #%%define need_sparc_shared 1
106 %define need_sparc_static 1
107 %define need_ppc_shared 1
109 # with shared: [else]
110 %define need_ix86_static 1
111 %define need_sparc_static 1
112 %define need_ppc_static 1
114 # with shared; [endif]
118 # with incall: [else]
125 %define need_ix86_shared_snap 1
127 # with shared: [else]
128 %define need_ix86_static_snap 1
130 # with shared; [endif]
135 %define need_ix86_shared 1
137 # with shared: [else]
138 %define need_ix86_static 1
140 # with shared; [endif]
145 %ifarch sparc sparc64
151 %define need_sparc_shared_snap 1
153 # with shared: [else]
154 %define need_sparc_static_snap 1
156 # with shared; [endif]
161 #%%define need_sparc_shared 1
162 %define need_sparc_static 1
164 # with shared: [else]
165 %define need_sparc_static 1
167 # with shared; [endif]
178 %define need_ppc_shared_snap 1
180 # with shared: [else]
181 %define need_ppc_static_snap 1
183 # with shared; [endif]
188 %define need_ppc_shared 1
190 # with shared: [else]
191 %define need_ppc_static 1
193 # with shared; [endif
199 # with incall; [endif]
202 %define need_ppc_shared_snap 0
203 %define need_ppc_static_snap 0
204 %define need_sparc_shared_snap 0
205 %define need_sparc_static_snap 0
209 Summary: World fastest web browser
210 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
212 Version: %{ver}%{fix}
213 Release: %{?with_snap:1.%{rel}.}%{_rel}
215 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
216 Group: X11/Applications/Networking
218 %if %{need_ix86_static}
219 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
220 # Source0-md5: dccdc5252ffc6658f3c46f32c64c8219
221 %{!?with_distributable:NoSource: 0}
224 %if %{need_ix86_static_snap}
226 Source30100: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
228 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
230 %{!?with_distributable:NoSource: 100}
233 %if %{need_sparc_static}
234 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
235 # Source1-md5: e7bcbbaa48a63827d0efc60cf6fef68d
236 %{!?with_distributable:NoSource: 1}
239 %if %{need_sparc_static_snap}
240 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
241 # Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1
242 %{!?with_distributable:NoSource: 101}
245 %if %{need_ppc_static}
246 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
247 # Source2-md5: d67428a09a036e786efc22e03150a344
248 %{!?with_distributable:NoSource: 2}
251 %if %{need_ppc_static_snap}
253 Source30102: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
255 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
257 %{!?with_distributable:NoSource: 102}
260 %if %{need_ix86_shared}
261 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
262 # Source20-md5: a60b0abe55ca580952b30f4540632425
263 %{!?with_distributable:NoSource: 20}
266 %if %{need_ix86_shared_snap}
268 Source301020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
269 # Source301020-md5: a60b0abe55ca580952b30f4540632425
271 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
272 # Source1020-md5: 6f296be6b9fc3001588d4509016062bd
273 %{!?with_distributable:NoSource: 1020}
277 %if %{need_sparc_shared}
278 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
279 # Source21-md5: 883df8058672cf52678a07d714dcfce
280 %{!?with_distributable:NoSource: 21}
283 %if %{need_sparc_shared_snap}
284 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
285 # Source1021-md5: e190021f5530de3f711006cd9f6bb339
286 %{!?with_distributable:NoSource: 1021}
289 %if %{need_ppc_shared}
290 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
291 # Source22-md5: 6ef04f12a39fdbe671dfbd6a37080a81
292 %{!?with_distributable:NoSource: 22}
295 %if %{need_ppc_shared_snap}
297 Source301022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
298 # Source301022-md5: 65293d788e18d0c23cccac71b9fe567c
300 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
301 # Source1022-md5: 74985fa6da49b2e54c9d03dab1119325
302 %{!?with_distributable:NoSource: 1022}
306 Source4: %{name}.desktop
307 Patch0: %{name}-wrapper.patch
308 URL: http://www.opera.com/
309 BuildRequires: sed >= 4.0
310 Requires: freetype >= 2
312 ExclusiveArch: %{ix86} ppc sparc sparc64
313 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
315 %define _plugindir %{_libdir}/opera/plugins
316 %define _operadocdir %{_docdir}/%{name}-%{ver}
319 Opera is world fastest web browser. It supports most of nowaday
320 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
324 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
325 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Ta
326 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
330 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}}
332 %ifarch sparc sparc64
333 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en%{?magicstr:-%{magicstr}}
336 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}}
341 rm -rf $RPM_BUILD_ROOT
342 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
345 DESTDIR=$RPM_BUILD_ROOT \
346 --prefix=%{_prefix} \
347 --exec_prefix=%{_libdir}/opera/bin \
348 --docdir=%{_operadocdir}
350 # install in kde etc.
351 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
352 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
354 mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
357 rm -rf $RPM_BUILD_ROOT
360 %defattr(644,root,root,755)
362 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
363 %attr(755,root,root) %{_bindir}/*
364 %dir %{_libdir}/opera
365 %dir %{_libdir}/opera/bin
366 %attr(755,root,root) %{_libdir}/opera/bin/*
368 %attr(755,root,root) %{_plugindir}/*
369 %dir %{_datadir}/opera
370 %{_datadir}/opera/*.*
371 %{_datadir}/opera/images
372 %{_datadir}/opera/ini
373 %{_datadir}/opera/java
374 %{_datadir}/opera/skin
375 %{_datadir}/opera/styles
376 %dir %{_datadir}/opera/locale
377 %{_datadir}/opera/locale/en
378 %{_datadir}/opera/locale/english.lng
379 %{_desktopdir}/*.desktop
380 %{_mandir}/man1/opera.1*
381 %{_pixmapsdir}/opera.xpm