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 20050728
18 %define reltype Preview-2
19 %define magicstr 1275-20050728-P2BT
24 %define dirrel 20050615
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 1
81 %define need_ppc_shared_snap 1
84 %define need_ix86_static_snap 1
85 %define need_sparc_static_snap 1
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}.}0.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/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
201 # Source0-md5: ea52b2cff58fb02a9c7c3dffa93c08e7
202 %{!?with_distributable:NoSource: 0}
205 %if %{need_ix86_static_snap}
206 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/en/%{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/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
212 # Source1-md5: 59909c2edfc7da7cbc52f1047975d485
213 %{!?with_distributable:NoSource: 1}
216 %if %{need_sparc_static_snap}
217 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/en/%{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/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
224 # Source2-md5: 9a04e99b99455dc3939adfb9502ce3f2
225 %{!?with_distributable:NoSource: 2}
228 %if %{need_ppc_static_snap}
229 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/en/%{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/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
235 # Source20-md5: cf2a3502687bdc57c06eca7b1fe1cc43
236 %{!?with_distributable:NoSource: 20}
239 %if %{need_ix86_shared_snap}
240 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/en/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
241 # Source1020-md5: d11026f15f8c3680a772e3278804accb
242 %{!?with_distributable:NoSource: 1020}
245 %if %{need_sparc_shared}
246 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
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/en/%{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: opera-8.02-20050705.3-shared-qt.ppc-en.tar.bz2
259 # Source22-md5: 12a30aa4983e6f9180c3f1a039118a4e
260 %{!?with_distributable:NoSource: 22}
263 %if %{need_ppc_shared_snap}
264 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/en/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
265 # Source1022-md5: daa712e362abe9d3dac74fad150d612c
266 %{!?with_distributable:NoSource: 1022}
269 Source4: %{name}.desktop
271 URL: http://www.opera.com/
272 ExclusiveArch: %{ix86} ppc sparc sparc64
273 Requires: freetype >= 2
274 Requires: openmotif >= 2
275 BuildRequires: sed >= 4.0
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. Only disadvantage are
285 advertisements on the top of its window. Version static linked with
289 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
290 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Jedyn±
291 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
292 statycznie skonsolidowana z qt.
296 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en
298 %ifarch sparc sparc64
299 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
302 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en
306 rm -rf $RPM_BUILD_ROOT
308 install -d $RPM_BUILD_ROOT{/etc,%{_libdir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
309 ln -s $RPM_BUILD_ROOT/etc $RPM_BUILD_ROOT%{_prefix}/etc
311 sed -i -e 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' install.sh
315 --prefix=$RPM_BUILD_ROOT%{_prefix} \
316 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
317 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
318 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
319 --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
320 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
323 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
326 sed -i -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{_bindir}/opera
328 # install in kde etc.
329 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
331 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
333 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
335 # always use latest possible wrapper
336 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
337 if [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3" ]; then
338 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
339 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
340 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2" ]; then
341 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
342 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
343 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1" ]; then
344 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
345 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
348 # clean unneeded files
349 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/config
352 rm -rf $RPM_BUILD_ROOT
355 %defattr(644,root,root,755)
356 %doc LICENSE bugreport
357 %attr(755,root,root) %{_bindir}/*
358 %dir %{_libdir}/opera
359 %dir %{_libdir}/opera/bin
360 %attr(755,root,root) %{_libdir}/opera/bin/*
362 %attr(755,root,root) %{_plugindir}/*
363 %dir %{_datadir}/opera
364 %{_datadir}/opera/*.*
365 %{_datadir}/opera/images
366 %{_datadir}/opera/ini
367 %{_datadir}/opera/java
368 %{_datadir}/opera/skin
369 %{_datadir}/opera/styles
370 %dir %{_datadir}/opera/locale
371 %{_datadir}/opera/locale/en
372 %{_datadir}/opera/locale/english.lng
373 %{_pixmapsdir}/opera.xpm
374 %{_desktopdir}/*.desktop
376 %{_mandir}/man1/opera.1*
378 %config(noreplace) %verify(not md5 size mtime) /etc/opera*rc*