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
13 %define dirrel 20050509
14 %define reltype Preview-1
19 %define dirrel 20050415
23 %define shver %(echo %{ver} | tr -d .)%{fix}
24 %define x86_shared_rel %{dirrel}.4
25 %define x86_static_rel %{dirrel}.1
26 %define sparc_shared_rel %{dirrel}.2
27 %define sparc_static_rel %{dirrel}.1
28 %define ppc_shared_rel %{dirrel}.3
29 %define ppc_static_rel %{dirrel}.1
32 # We should be able to build src.rpm also on not supported archs
33 %define rel %{x86_shared_rel}
35 %define rel %{sparc_shared_rel}
38 %define rel %{ppc_shared_rel}
42 %define rel %{x86_static_rel}
44 %define rel %{sparc_static_rel}
47 %define rel %{ppc_static_rel}
51 # define to 0 and then redefine to avoid
53 %define need_ix86_shared_snap 0
54 %define need_sparc_shared_snap 0
55 %define need_ppc_shared_snap 0
56 %define need_ix86_static_snap 0
57 %define need_sparc_static_snap 0
58 %define need_ppc_static_snap 0
60 %define need_ix86_shared 0
61 %define need_sparc_shared 0
62 %define need_ppc_shared 0
63 %define need_ix86_static 0
64 %define need_sparc_static 0
65 %define need_ppc_static 0
73 %define need_ix86_shared_snap 1
74 %define need_sparc_shared_snap 1
75 %define need_ppc_shared_snap 1
78 %define need_ix86_static_snap 1
79 %define need_sparc_static_snap 1
80 %define need_ppc_static_snap 1
82 # with shared; [endif]
87 %define need_ix86_shared 1
88 %define need_sparc_shared 1
89 %define need_ppc_shared 1
92 %define need_ix86_static 1
93 %define need_sparc_static 1
94 %define need_ppc_static 1
96 # with shared; [endif]
100 # with incall: [else]
107 %define need_ix86_shared_snap 1
109 # with shared: [else]
110 %define need_ix86_static_snap 1
112 # with shared; [endif]
117 %define need_ix86_shared 1
119 # with shared: [else]
120 %define need_ix86_static 1
122 # with shared; [endif]
127 %ifarch sparc sparc64
133 %define need_sparc_shared_snap 1
135 # with shared: [else]
136 %define need_sparc_static_snap 1
138 # with shared; [endif]
143 %define need_sparc_shared 1
145 # with shared: [else]
146 %define need_sparc_static 1
148 # with shared; [endif]
159 %define need_ppc_shared_snap 1
161 # with shared: [else]
162 %define need_ppc_static_snap 1
164 # with shared; [endif]
169 %define need_ppc_shared 1
171 # with shared: [else]
172 %define need_ppc_static 1
174 # with shared; [endif
180 # with incall; [endif]
182 Summary: World fastest web browser
183 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
185 Version: %{ver}%{fix}%{?with_snap:.%{rel}}
188 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
189 Group: X11/Applications/Networking
191 %if %{need_ix86_static}
192 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
193 # Source0-md5: 94d1d86f42d9aa912c288e47c4b3893f
194 %{!?with_distributable:NoSource: 0}
197 %if %{need_ix86_static_snap}
198 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
199 %{!?with_distributable:NoSource: 100}
202 %if %{need_sparc_static}
203 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
204 # Source1-md5: da6f20e3e881ca3c92024758dbe473d2
205 %{!?with_distributable:NoSource: 1}
208 %if %{need_sparc_static_snap}
209 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
210 # Source101-md5: 913ccb28106f9f5acd3d9e4c8dc71ae1
211 %{!?with_distributable:NoSource: 101}
214 %if %{need_ppc_static}
215 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
216 # Source2-md5: 5fe172a95df147f709af5bff021edc15
217 %{!?with_distributable:NoSource: 2}
220 %if %{need_ppc_static_snap}
221 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
222 %{!?with_distributable:NoSource: 102}
225 %if %{need_ix86_shared}
226 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/gcc-3.2/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
227 # Source20-md5: d48b48ffbdae4a452e626c56078b7ca8
228 %{!?with_distributable:NoSource: 20}
231 %if %{need_ix86_shared_snap}
232 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
233 # Source1020-md5: e3602032ae454a86cc2854685043c1aa
234 %{!?with_distributable:NoSource: 1020}
237 %if %{need_sparc_shared}
238 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
239 # Source21-md5: 883df8058672cf52678a07d7194dcfce
240 %{!?with_distributable:NoSource: 21}
243 %if %{need_ix86_shared_snap}
244 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
245 # Source1021-md5: e98aeabb57962b6577a10d43c7b3efa0
246 %{!?with_distributable:NoSource: 1021}
249 %if %{need_ppc_shared}
250 Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
251 # Source22-md5: eae16c9b27e39376a89fe87eeddbe7bc
252 %{!?with_distributable:NoSource: 22}
255 %if %{need_ppc_shared_snap}
256 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
257 # Source1022-md5: 50836edd6eae80c202edea641229a902
258 %{!?with_distributable:NoSource: 1022}
261 Source4: %{name}.desktop
263 URL: http://www.opera.com/
264 ExclusiveArch: %{ix86} ppc sparc sparc64
265 Requires: freetype >= 2
266 Requires: openmotif >= 2
267 BuildRequires: sed >= 4.0
268 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
270 %define _plugindir %{_libdir}/opera/plugins
271 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
272 %define configfile %{_datadir}/opera/config/opera6rc
275 Opera is world fastest web browser. It supports most of nowaday
276 extensions of HTML. And it is quite stable. Only disadvantage are
277 advertisements on the top of its window. Version static linked with
281 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
282 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Jedyn±
283 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
284 statycznie skonsolidowana z qt.
288 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en
290 %ifarch sparc sparc64
291 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
294 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en
298 rm -rf $RPM_BUILD_ROOT
300 install -d $RPM_BUILD_ROOT{/etc,%{_libdir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
301 ln -s $RPM_BUILD_ROOT/etc $RPM_BUILD_ROOT%{_prefix}/etc
303 sed -i -e 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' install.sh
307 --prefix=$RPM_BUILD_ROOT%{_prefix} \
308 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
309 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
310 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
311 --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
312 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
315 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
318 sed -i -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{_bindir}/opera
320 # install in kde etc.
321 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
323 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
325 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
327 # always use latest possible wrapper
328 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
329 if [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3" ]; then
330 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
331 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
332 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2" ]; then
333 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
334 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
335 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1" ]; then
336 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
337 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
340 # clean unneeded files
341 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/config
344 rm -rf $RPM_BUILD_ROOT
347 %defattr(644,root,root,755)
348 %doc LICENSE bugreport
349 %attr(755,root,root) %{_bindir}/*
350 %dir %{_libdir}/opera
351 %dir %{_libdir}/opera/bin
352 %attr(755,root,root) %{_libdir}/opera/bin/*
354 %attr(755,root,root) %{_plugindir}/*
355 %dir %{_datadir}/opera
356 %{_datadir}/opera/*.*
357 %{_datadir}/opera/images
358 %{_datadir}/opera/ini
359 %{_datadir}/opera/java
360 %{_datadir}/opera/skin
361 %{_datadir}/opera/styles
362 %dir %{_datadir}/opera/locale
363 %{_datadir}/opera/locale/en
364 %{_datadir}/opera/locale/english.lng
365 %{_pixmapsdir}/opera.xpm
366 %{_desktopdir}/*.desktop
368 %{_mandir}/man1/opera.1*
370 %config(noreplace) %verify(not md5 size mtime) /etc/opera*rc*