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 20060518
26 %define dirrel 20060206
27 %define reltype Preview-2
28 %define magicstr %{nil}
34 %define dirrel 20060518
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]
201 Summary: World fastest web browser
202 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
204 Version: %{ver}%{fix}
205 Release: %{?with_snap:1.%{rel}.}1
207 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
208 Group: X11/Applications/Networking
210 %if %{need_ix86_static}
211 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
212 # Source0-md5: 54a29d830506e6c9381a305e0353055c
213 %{!?with_distributable:NoSource: 0}
216 %if %{need_ix86_static_snap}
218 Source30100: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
220 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
222 %{!?with_distributable:NoSource: 100}
225 %if %{need_sparc_static}
226 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en-%{magicstr}.tar.bz2
227 # Source1-md5: 201c1927677939ab596f8c940f9fd059
228 %{!?with_distributable:NoSource: 1}
231 %if %{need_sparc_static_snap}
232 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
233 # Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1
234 %{!?with_distributable:NoSource: 101}
237 %if %{need_ppc_static}
238 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
239 # Source2-md5: b86bbd1b1ca2e146c30bfedcbe4403d0
240 %{!?with_distributable:NoSource: 2}
243 %if %{need_ppc_static_snap}
245 Source30102: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
247 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
249 %{!?with_distributable:NoSource: 102}
252 %if %{need_ix86_shared}
253 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
254 # Source20-md5: 4ea4938d39ae8c29c44208b246501cf6
255 %{!?with_distributable:NoSource: 20}
258 %if %{need_ix86_shared_snap}
260 Source301020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
261 # Source301020-md5: 4ea4938d39ae8c29c44208b246501cf6
263 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
264 # Source1020-md5: 6f296be6b9fc3001588d4509016062bd
265 %{!?with_distributable:NoSource: 1020}
269 %if %{need_sparc_shared}
270 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-%{magicstr}.tar.bz2
271 # Source21-md5: 883df8058672cf52678a07d714dcfce
272 %{!?with_distributable:NoSource: 21}
275 %if %{need_sparc_shared_snap}
276 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
277 # Source1021-md5: e190021f5530de3f711006cd9f6bb339
278 %{!?with_distributable:NoSource: 1021}
281 %if %{need_ppc_shared}
282 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-%{magicstr}.tar.bz2
283 # Source22-md5: 32c82535e3b1ea2b49389b4aa289234f
284 %{!?with_distributable:NoSource: 22}
287 %if %{need_ppc_shared_snap}
289 Source301022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
290 # Source301022-md5: 4ef11bec6221d79e30dfbbf76ff89fa3
292 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
293 # Source1022-md5: 74985fa6da49b2e54c9d03dab1119325
294 %{!?with_distributable:NoSource: 1022}
298 Source4: %{name}.desktop
300 URL: http://www.opera.com/
301 BuildRequires: sed >= 4.0
302 Requires: freetype >= 2
303 %{!?with_snap:Requires: openmotif >= 2}
305 ExclusiveArch: %{ix86} ppc sparc sparc64
306 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
308 %define _plugindir %{_libdir}/opera/plugins
309 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
310 %define configfile %{_datadir}/opera/config/opera6rc
313 Opera is world fastest web browser. It supports most of nowaday
314 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
318 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
319 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Ta
320 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
324 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en-%{magicstr}
326 %ifarch sparc sparc64
327 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
330 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en-%{magicstr}
334 rm -rf $RPM_BUILD_ROOT
336 install -d $RPM_BUILD_ROOT{/etc,%{_libdir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
337 ln -s $RPM_BUILD_ROOT/etc $RPM_BUILD_ROOT%{_prefix}/etc
339 sed -i -e 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' \
340 -e 's|OPERA_SCRIPT_PATH=$0|OPERA_SCRIPT_PATH=|' install.sh
344 --prefix=$RPM_BUILD_ROOT%{_prefix} \
345 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
346 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
347 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
348 --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
349 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
352 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
355 sed -i -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{_bindir}/opera
357 # install in kde etc.
358 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
360 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
362 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
364 # always use latest possible wrapper
365 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
366 if [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3" ]; then
367 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
368 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
369 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2" ]; then
370 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
371 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
372 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1" ]; then
373 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
374 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
377 # clean unneeded files
378 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/config
381 rm -rf $RPM_BUILD_ROOT
384 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_bindir}/*
387 %dir %{_libdir}/opera
388 %dir %{_libdir}/opera/bin
389 %attr(755,root,root) %{_libdir}/opera/bin/*
391 %attr(755,root,root) %{_plugindir}/*
392 %dir %{_datadir}/opera
393 %{_datadir}/opera/*.*
394 %{_datadir}/opera/images
395 %{_datadir}/opera/ini
396 %{_datadir}/opera/java
397 %{_datadir}/opera/skin
398 %{_datadir}/opera/styles
399 %dir %{_datadir}/opera/locale
400 %{_datadir}/opera/locale/en
401 %{_datadir}/opera/locale/english.lng
402 %{_pixmapsdir}/opera.xpm
403 %{_desktopdir}/*.desktop
405 %{_mandir}/man1/opera.1*
407 %config(noreplace) %verify(not md5 mtime size) /etc/opera*rc*