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 20060418
26 %define dirrel 20060206
27 %define reltype Preview-2
28 %define magicstr %{nil}
33 %define dirrel 20060330
38 %define shver %(echo %{ver} | tr -d .)%{fix}
39 %define x86_shared_rel %{dirrel}.5
40 %define x86_static_rel %{dirrel}.1
41 %define sparc_shared_rel %{dirrel}.2
42 %define sparc_static_rel %{dirrel}.1
43 %define ppc_shared_rel %{dirrel}.3
44 %define ppc_static_rel %{dirrel}.1
47 # We should be able to build src.rpm also on not supported archs
48 %define rel %{x86_shared_rel}
50 #%%define rel %{sparc_shared_rel}
51 %define rel %{sparc_static_rel}
54 %define rel %{ppc_shared_rel}
58 %define rel %{x86_static_rel}
60 %define rel %{sparc_static_rel}
63 %define rel %{ppc_static_rel}
67 # define to 0 and then redefine to avoid
69 %define need_ix86_shared_snap 0
70 %define need_sparc_shared_snap 0
71 %define need_ppc_shared_snap 0
72 %define need_ix86_static_snap 0
73 %define need_sparc_static_snap 0
74 %define need_ppc_static_snap 0
76 %define need_ix86_shared 0
77 %define need_sparc_shared 0
78 %define need_ppc_shared 0
79 %define need_ix86_static 0
80 %define need_sparc_static 0
81 %define need_ppc_static 0
89 %define need_ix86_shared_snap 1
90 %define need_sparc_shared_snap 0
91 %define need_ppc_shared_snap 1
94 %define need_ix86_static_snap 1
95 %define need_sparc_static_snap 1
96 %define need_ppc_static_snap 1
98 # with shared; [endif]
103 %define need_ix86_shared 1
104 #%%define need_sparc_shared 1
105 %define need_sparc_static 1
106 %define need_ppc_shared 1
108 # with shared: [else]
109 %define need_ix86_static 1
110 %define need_sparc_static 1
111 %define need_ppc_static 1
113 # with shared; [endif]
117 # with incall: [else]
124 %define need_ix86_shared_snap 1
126 # with shared: [else]
127 %define need_ix86_static_snap 1
129 # with shared; [endif]
134 %define need_ix86_shared 1
136 # with shared: [else]
137 %define need_ix86_static 1
139 # with shared; [endif]
144 %ifarch sparc sparc64
150 %define need_sparc_shared_snap 1
152 # with shared: [else]
153 %define need_sparc_static_snap 1
155 # with shared; [endif]
160 #%%define need_sparc_shared 1
161 %define need_sparc_static 1
163 # with shared: [else]
164 %define need_sparc_static 1
166 # with shared; [endif]
177 %define need_ppc_shared_snap 1
179 # with shared: [else]
180 %define need_ppc_static_snap 1
182 # with shared; [endif]
187 %define need_ppc_shared 1
189 # with shared: [else]
190 %define need_ppc_static 1
192 # with shared; [endif
198 # with incall; [endif]
200 Summary: World fastest web browser
201 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
203 Version: %{ver}%{fix}
204 Release: %{?with_snap:0.%{rel}.}1
206 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
207 Group: X11/Applications/Networking
209 %if %{need_ix86_static}
210 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
211 # Source0-md5: e051ee0f78dbf7fac407fad147e02d8b
212 %{!?with_distributable:NoSource: 0}
215 %if %{need_ix86_static_snap}
217 Source30100: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
219 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
221 %{!?with_distributable:NoSource: 100}
224 %if %{need_sparc_static}
225 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
226 # Source1-md5: 1225c949dca9782a82a4f275e4271a87
227 %{!?with_distributable:NoSource: 1}
230 %if %{need_sparc_static_snap}
231 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
232 # Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1
233 %{!?with_distributable:NoSource: 101}
236 %if %{need_ppc_static}
237 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
238 # Source2-md5: 42a515f683a31522484c3770618cd2dd
239 %{!?with_distributable:NoSource: 2}
242 %if %{need_ppc_static_snap}
244 Source30102: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
246 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
248 %{!?with_distributable:NoSource: 102}
251 %if %{need_ix86_shared}
252 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
253 # Source20-md5: 4887d49469a374b993010807dba79d32
254 %{!?with_distributable:NoSource: 20}
257 %if %{need_ix86_shared_snap}
259 Source301020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
260 # Source301020-md5: 351b12c0f6fc03c2d71b7b771c972997
262 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
263 # Source1020-md5: 6f296be6b9fc3001588d4509016062bd
265 %{!?with_distributable:NoSource: 1020}
268 %if %{need_sparc_shared}
269 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
270 # Source21-md5: 883df8058672cf52678a07d714dcfce
271 %{!?with_distributable:NoSource: 21}
274 %if %{need_sparc_shared_snap}
275 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
276 # Source1021-md5: e190021f5530de3f711006cd9f6bb339
277 %{!?with_distributable:NoSource: 1021}
280 %if %{need_ppc_shared}
281 Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
282 # Source22-md5: 4f8270e2c590393266fd1e3a8ceaa5d3
283 %{!?with_distributable:NoSource: 22}
286 %if %{need_ppc_shared_snap}
288 Source301022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
289 # Source301022-md5: 4ef11bec6221d79e30dfbbf76ff89fa3
291 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
292 # Source1022-md5: 74985fa6da49b2e54c9d03dab1119325
294 %{!?with_distributable:NoSource: 1022}
297 Source4: %{name}.desktop
299 URL: http://www.opera.com/
300 BuildRequires: sed >= 4.0
301 Requires: freetype >= 2
302 %{!?with_snap:Requires: openmotif >= 2}
304 ExclusiveArch: %{ix86} ppc sparc sparc64
305 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
307 %define _plugindir %{_libdir}/opera/plugins
308 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
309 %define configfile %{_datadir}/opera/config/opera6rc
312 Opera is world fastest web browser. It supports most of nowaday
313 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
317 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
318 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Ta
319 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
323 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?with_weekly:-%{magicstr}}
325 %ifarch sparc sparc64
326 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
329 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?with_weekly:-%{magicstr}}
333 rm -rf $RPM_BUILD_ROOT
335 install -d $RPM_BUILD_ROOT{/etc,%{_libdir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
336 ln -s $RPM_BUILD_ROOT/etc $RPM_BUILD_ROOT%{_prefix}/etc
338 sed -i -e 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' \
339 -e 's|OPERA_SCRIPT_PATH=$0|OPERA_SCRIPT_PATH=|' install.sh
343 --prefix=$RPM_BUILD_ROOT%{_prefix} \
344 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
345 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
346 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
347 --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
348 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
351 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
354 sed -i -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{_bindir}/opera
356 # install in kde etc.
357 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
359 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
361 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
363 # always use latest possible wrapper
364 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
365 if [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3" ]; then
366 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
367 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
368 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2" ]; then
369 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
370 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
371 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1" ]; then
372 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
373 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
376 # clean unneeded files
377 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/config
380 rm -rf $RPM_BUILD_ROOT
383 %defattr(644,root,root,755)
385 %attr(755,root,root) %{_bindir}/*
386 %dir %{_libdir}/opera
387 %dir %{_libdir}/opera/bin
388 %attr(755,root,root) %{_libdir}/opera/bin/*
390 %attr(755,root,root) %{_plugindir}/*
391 %dir %{_datadir}/opera
392 %{_datadir}/opera/*.*
393 %{_datadir}/opera/images
394 %{_datadir}/opera/ini
395 %{_datadir}/opera/java
396 %{_datadir}/opera/skin
397 %{_datadir}/opera/styles
398 %dir %{_datadir}/opera/locale
399 %{_datadir}/opera/locale/en
400 %{_datadir}/opera/locale/english.lng
401 %{_pixmapsdir}/opera.xpm
402 %{_desktopdir}/*.desktop
404 %{_mandir}/man1/opera.1*
406 %config(noreplace) %verify(not md5 mtime size) /etc/opera*rc*