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 20060217
26 %define dirrel 20060206
27 %define reltype Preview-2
28 %define magicstr %{nil}
33 %define dirrel 20060201
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 Source100: 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: 2dec5155b24752517fbf1143d861f8f1
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 Source102: 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: a1847d8693025a16188bc3c165eff71a
254 %{!?with_distributable:NoSource: 20}
257 %if %{need_ix86_shared_snap}
259 Source1020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
261 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
262 # Source1020-md5: 6f296be6b9fc3001588d4509016062bd
264 %{!?with_distributable:NoSource: 1020}
267 %if %{need_sparc_shared}
268 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
269 # Source21-md5: 883df8058672cf52678a07d714dcfce
270 %{!?with_distributable:NoSource: 21}
273 %if %{need_sparc_shared_snap}
274 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
275 # Source1021-md5: e190021f5530de3f711006cd9f6bb339
276 %{!?with_distributable:NoSource: 1021}
279 %if %{need_ppc_shared}
280 Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
281 # Source22-md5: 670e9fbc029a374187438e92a8c8602f
282 %{!?with_distributable:NoSource: 22}
285 %if %{need_ppc_shared_snap}
287 Source1022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
289 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
290 # Source1022-md5: 74985fa6da49b2e54c9d03dab1119325
292 %{!?with_distributable:NoSource: 1022}
295 Source4: %{name}.desktop
297 URL: http://www.opera.com/
298 BuildRequires: sed >= 4.0
299 Requires: freetype >= 2
300 %{!?with_snap:Requires: openmotif >= 2}
302 ExclusiveArch: %{ix86} ppc sparc sparc64
303 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
305 %define _plugindir %{_libdir}/opera/plugins
306 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
307 %define configfile %{_datadir}/opera/config/opera6rc
310 Opera is world fastest web browser. It supports most of nowaday
311 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
315 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
316 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Ta
317 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
321 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?with_weekly:-%{magicstr}}
323 %ifarch sparc sparc64
324 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
327 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?with_weekly:-%{magicstr}}
331 rm -rf $RPM_BUILD_ROOT
333 install -d $RPM_BUILD_ROOT{/etc,%{_libdir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
334 ln -s $RPM_BUILD_ROOT/etc $RPM_BUILD_ROOT%{_prefix}/etc
336 sed -i -e 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' \
337 -e 's|OPERA_SCRIPT_PATH=$0|OPERA_SCRIPT_PATH=|' install.sh
341 --prefix=$RPM_BUILD_ROOT%{_prefix} \
342 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
343 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
344 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
345 --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
346 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
349 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
352 sed -i -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{_bindir}/opera
354 # install in kde etc.
355 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
357 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
359 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
361 # always use latest possible wrapper
362 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
363 if [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3" ]; then
364 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
365 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
366 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2" ]; then
367 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
368 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
369 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1" ]; then
370 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
371 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
374 # clean unneeded files
375 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/config
378 rm -rf $RPM_BUILD_ROOT
381 %defattr(644,root,root,755)
382 %doc LICENSE bugreport
383 %attr(755,root,root) %{_bindir}/*
384 %dir %{_libdir}/opera
385 %dir %{_libdir}/opera/bin
386 %attr(755,root,root) %{_libdir}/opera/bin/*
388 %attr(755,root,root) %{_plugindir}/*
389 %dir %{_datadir}/opera
390 %{_datadir}/opera/*.*
391 %{_datadir}/opera/images
392 %{_datadir}/opera/ini
393 %{_datadir}/opera/java
394 %{_datadir}/opera/skin
395 %{_datadir}/opera/styles
396 %dir %{_datadir}/opera/locale
397 %{_datadir}/opera/locale/en
398 %{_datadir}/opera/locale/english.lng
399 %{_pixmapsdir}/opera.xpm
400 %{_desktopdir}/*.desktop
402 %{_mandir}/man1/opera.1*
404 %config(noreplace) %verify(not md5 mtime size) /etc/opera*rc*