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
17 %define dirrel 20051020
18 %define reltype Preview-1
19 %define magicstr %{nil}
24 %define dirrel 20051114
28 %define shver %(echo %{ver} | tr -d .)%{fix}
29 %define x86_shared_rel %{dirrel}.5
30 %define x86_static_rel %{dirrel}.1
31 %define sparc_shared_rel %{dirrel}.2
32 %define sparc_static_rel %{dirrel}.1
33 %define ppc_shared_rel %{dirrel}.3
34 %define ppc_static_rel %{dirrel}.1
37 # We should be able to build src.rpm also on not supported archs
38 %define rel %{x86_shared_rel}
40 #%%define rel %{sparc_shared_rel}
41 %define rel %{sparc_static_rel}
44 %define rel %{ppc_shared_rel}
48 %define rel %{x86_static_rel}
50 %define rel %{sparc_static_rel}
53 %define rel %{ppc_static_rel}
57 # define to 0 and then redefine to avoid
59 %define need_ix86_shared_snap 0
60 %define need_sparc_shared_snap 0
61 %define need_ppc_shared_snap 0
62 %define need_ix86_static_snap 0
63 %define need_sparc_static_snap 0
64 %define need_ppc_static_snap 0
66 %define need_ix86_shared 0
67 %define need_sparc_shared 0
68 %define need_ppc_shared 0
69 %define need_ix86_static 0
70 %define need_sparc_static 0
71 %define need_ppc_static 0
79 %define need_ix86_shared_snap 1
80 %define need_sparc_shared_snap 0
81 %define need_ppc_shared_snap 1
84 %define need_ix86_static_snap 1
85 %define need_sparc_static_snap 0
86 %define need_ppc_static_snap 1
88 # with shared; [endif]
93 %define need_ix86_shared 1
94 #%%define need_sparc_shared 1
95 %define need_sparc_static 1
96 %define need_ppc_shared 1
99 %define need_ix86_static 1
100 %define need_sparc_static 1
101 %define need_ppc_static 1
103 # with shared; [endif]
107 # with incall: [else]
114 %define need_ix86_shared_snap 1
116 # with shared: [else]
117 %define need_ix86_static_snap 1
119 # with shared; [endif]
124 %define need_ix86_shared 1
126 # with shared: [else]
127 %define need_ix86_static 1
129 # with shared; [endif]
134 %ifarch sparc sparc64
140 %define need_sparc_shared_snap 1
142 # with shared: [else]
143 %define need_sparc_static_snap 1
145 # with shared; [endif]
150 #%%define need_sparc_shared 1
151 %define need_sparc_static 1
153 # with shared: [else]
154 %define need_sparc_static 1
156 # with shared; [endif]
167 %define need_ppc_shared_snap 1
169 # with shared: [else]
170 %define need_ppc_static_snap 1
172 # with shared; [endif]
177 %define need_ppc_shared 1
179 # with shared: [else]
180 %define need_ppc_static 1
182 # with shared; [endif
188 # with incall; [endif]
190 Summary: World fastest web browser
191 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
193 Version: %{ver}%{fix}
194 Release: %{?with_snap:0.%{rel}.}1
196 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
197 Group: X11/Applications/Networking
199 %if %{need_ix86_static}
200 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
201 # Source0-md5: bd6bd9cfaf13b6509c8531d02a4c51a2
202 %{!?with_distributable:NoSource: 0}
205 %if %{need_ix86_static_snap}
206 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
207 %{!?with_distributable:NoSource: 100}
210 %if %{need_sparc_static}
211 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
212 # Source1-md5: ff5976406678e864116b1ff093a177b4
213 %{!?with_distributable:NoSource: 1}
216 %if %{need_sparc_static_snap}
217 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
218 # Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1
219 %{!?with_distributable:NoSource: 101}
222 %if %{need_ppc_static}
223 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
224 # Source2-md5: 78c3b7d568b3e35a0f7cf3b55d2a6238
225 %{!?with_distributable:NoSource: 2}
228 %if %{need_ppc_static_snap}
229 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
230 %{!?with_distributable:NoSource: 102}
233 %if %{need_ix86_shared}
234 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
235 # Source20-md5: c9aa6c640406548fcc655a18227d9037
236 %{!?with_distributable:NoSource: 20}
239 %if %{need_ix86_shared_snap}
240 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
241 # Source1020-md5: 2ee14fa46152665c42f0ef41436e43d0
242 %{!?with_distributable:NoSource: 1020}
245 %if %{need_sparc_shared}
246 Source21: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
247 # Source21-md5: 883df8058672cf52678a07d714dcfce
248 %{!?with_distributable:NoSource: 21}
251 %if %{need_sparc_shared_snap}
252 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
253 # Source1021-md5: e190021f5530de3f711006cd9f6bb339
254 %{!?with_distributable:NoSource: 1021}
257 %if %{need_ppc_shared}
258 Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
259 # Source22-md5: 36f9398664c70b14c748db736a25aa2a
260 %{!?with_distributable:NoSource: 22}
263 %if %{need_ppc_shared_snap}
264 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
265 # Source1022-md5: bb130afce8f1b2252f7f7b641942b48b
266 %{!?with_distributable:NoSource: 1022}
269 Source4: %{name}.desktop
271 URL: http://www.opera.com/
272 ExclusiveArch: %{ix86} ppc sparc sparc64
273 BuildRequires: sed >= 4.0
274 Requires: freetype >= 2
275 Requires: openmotif >= 2
276 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
278 %define _plugindir %{_libdir}/opera/plugins
279 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
280 %define configfile %{_datadir}/opera/config/opera6rc
283 Opera is world fastest web browser. It supports most of nowaday
284 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
288 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
289 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Ta
290 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
294 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en
296 %ifarch sparc sparc64
297 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
300 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en
304 rm -rf $RPM_BUILD_ROOT
306 install -d $RPM_BUILD_ROOT{/etc,%{_libdir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
307 ln -s $RPM_BUILD_ROOT/etc $RPM_BUILD_ROOT%{_prefix}/etc
309 sed -i -e 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' install.sh
313 --prefix=$RPM_BUILD_ROOT%{_prefix} \
314 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
315 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
316 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
317 --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
318 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
321 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
324 sed -i -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{_bindir}/opera
326 # install in kde etc.
327 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
329 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
331 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
333 # always use latest possible wrapper
334 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
335 if [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3" ]; then
336 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
337 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
338 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2" ]; then
339 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
340 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
341 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1" ]; then
342 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
343 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
346 # clean unneeded files
347 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/config
350 rm -rf $RPM_BUILD_ROOT
353 %defattr(644,root,root,755)
354 %doc LICENSE bugreport
355 %attr(755,root,root) %{_bindir}/*
356 %dir %{_libdir}/opera
357 %dir %{_libdir}/opera/bin
358 %attr(755,root,root) %{_libdir}/opera/bin/*
360 %attr(755,root,root) %{_plugindir}/*
361 %dir %{_datadir}/opera
362 %{_datadir}/opera/*.*
363 %{_datadir}/opera/images
364 %{_datadir}/opera/ini
365 %{_datadir}/opera/java
366 %{_datadir}/opera/skin
367 %{_datadir}/opera/styles
368 %dir %{_datadir}/opera/locale
369 %{_datadir}/opera/locale/en
370 %{_datadir}/opera/locale/english.lng
371 %{_pixmapsdir}/opera.xpm
372 %{_desktopdir}/*.desktop
374 %{_mandir}/man1/opera.1*
376 %config(noreplace) %verify(not md5 mtime size) /etc/opera*rc*