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 20050509
18 %define reltype Preview-1
23 %define dirrel 20050415
27 %define shver %(echo %{ver} | tr -d .)%{fix}
28 %define x86_shared_rel %{dirrel}.4
29 %define x86_static_rel %{dirrel}.1
30 %define sparc_shared_rel %{dirrel}.2
31 %define sparc_static_rel %{dirrel}.1
32 %define ppc_shared_rel %{dirrel}.3
33 %define ppc_static_rel %{dirrel}.1
36 # We should be able to build src.rpm also on not supported archs
37 %define rel %{x86_shared_rel}
39 %define rel %{sparc_shared_rel}
42 %define rel %{ppc_shared_rel}
46 %define rel %{x86_static_rel}
48 %define rel %{sparc_static_rel}
51 %define rel %{ppc_static_rel}
55 # define to 0 and then redefine to avoid
57 %define need_ix86_shared_snap 0
58 %define need_sparc_shared_snap 0
59 %define need_ppc_shared_snap 0
60 %define need_ix86_static_snap 0
61 %define need_sparc_static_snap 0
62 %define need_ppc_static_snap 0
64 %define need_ix86_shared 0
65 %define need_sparc_shared 0
66 %define need_ppc_shared 0
67 %define need_ix86_static 0
68 %define need_sparc_static 0
69 %define need_ppc_static 0
77 %define need_ix86_shared_snap 1
78 %define need_sparc_shared_snap 1
79 %define need_ppc_shared_snap 1
82 %define need_ix86_static_snap 1
83 %define need_sparc_static_snap 1
84 %define need_ppc_static_snap 1
86 # with shared; [endif]
91 %define need_ix86_shared 1
92 %define need_sparc_shared 1
93 %define need_ppc_shared 1
96 %define need_ix86_static 1
97 %define need_sparc_static 1
98 %define need_ppc_static 1
100 # with shared; [endif]
104 # with incall: [else]
111 %define need_ix86_shared_snap 1
113 # with shared: [else]
114 %define need_ix86_static_snap 1
116 # with shared; [endif]
121 %define need_ix86_shared 1
123 # with shared: [else]
124 %define need_ix86_static 1
126 # with shared; [endif]
131 %ifarch sparc sparc64
137 %define need_sparc_shared_snap 1
139 # with shared: [else]
140 %define need_sparc_static_snap 1
142 # with shared; [endif]
147 %define need_sparc_shared 1
149 # with shared: [else]
150 %define need_sparc_static 1
152 # with shared; [endif]
163 %define need_ppc_shared_snap 1
165 # with shared: [else]
166 %define need_ppc_static_snap 1
168 # with shared; [endif]
173 %define need_ppc_shared 1
175 # with shared: [else]
176 %define need_ppc_static 1
178 # with shared; [endif
184 # with incall; [endif]
186 Summary: World fastest web browser
187 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
189 Version: %{ver}%{fix}%{?with_snap:.%{rel}}
192 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
193 Group: X11/Applications/Networking
195 %if %{need_ix86_static}
196 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
197 # Source0-md5: 94d1d86f42d9aa912c288e47c4b3893f
198 %{!?with_distributable:NoSource: 0}
201 %if %{need_ix86_static_snap}
202 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
203 %{!?with_distributable:NoSource: 100}
206 %if %{need_sparc_static}
207 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
208 # Source1-md5: da6f20e3e881ca3c92024758dbe473d2
209 %{!?with_distributable:NoSource: 1}
212 %if %{need_sparc_static_snap}
213 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
214 # Source101-md5: 913ccb28106f9f5acd3d9e4c8dc71ae1
215 %{!?with_distributable:NoSource: 101}
218 %if %{need_ppc_static}
219 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
220 # Source2-md5: 5fe172a95df147f709af5bff021edc15
221 %{!?with_distributable:NoSource: 2}
224 %if %{need_ppc_static_snap}
225 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
226 %{!?with_distributable:NoSource: 102}
229 %if %{need_ix86_shared}
230 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
231 # Source20-md5: d48b48ffbdae4a452e626c56078b7ca8
232 %{!?with_distributable:NoSource: 20}
235 %if %{need_ix86_shared_snap}
236 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
237 # Source1020-md5: e3602032ae454a86cc2854685043c1aa
238 %{!?with_distributable:NoSource: 1020}
241 %if %{need_sparc_shared}
242 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
243 # Source21-md5: 883df8058672cf52678a07d7194dcfce
244 %{!?with_distributable:NoSource: 21}
247 %if %{need_sparc_shared_snap}
248 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
249 # Source1021-md5: e98aeabb57962b6577a10d43c7b3efa0
250 %{!?with_distributable:NoSource: 1021}
253 %if %{need_ppc_shared}
254 Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
255 # Source22-md5: eae16c9b27e39376a89fe87eeddbe7bc
256 %{!?with_distributable:NoSource: 22}
259 %if %{need_ppc_shared_snap}
260 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
261 # Source1022-md5: 50836edd6eae80c202edea641229a902
262 %{!?with_distributable:NoSource: 1022}
265 Source4: %{name}.desktop
267 URL: http://www.opera.com/
268 ExclusiveArch: %{ix86} ppc sparc sparc64
269 Requires: freetype >= 2
270 Requires: openmotif >= 2
271 BuildRequires: sed >= 4.0
272 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
274 %define _plugindir %{_libdir}/opera/plugins
275 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
276 %define configfile %{_datadir}/opera/config/opera6rc
279 Opera is world fastest web browser. It supports most of nowaday
280 extensions of HTML. And it is quite stable. Only disadvantage are
281 advertisements on the top of its window. Version static linked with
285 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
286 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Jedyn±
287 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
288 statycznie skonsolidowana z qt.
292 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en
294 %ifarch sparc sparc64
295 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
298 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en
302 rm -rf $RPM_BUILD_ROOT
304 install -d $RPM_BUILD_ROOT{/etc,%{_libdir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
305 ln -s $RPM_BUILD_ROOT/etc $RPM_BUILD_ROOT%{_prefix}/etc
307 sed -i -e 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' install.sh
311 --prefix=$RPM_BUILD_ROOT%{_prefix} \
312 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
313 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
314 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
315 --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
316 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
319 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
322 sed -i -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{_bindir}/opera
324 # install in kde etc.
325 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
327 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
329 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
331 # always use latest possible wrapper
332 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
333 if [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3" ]; then
334 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
335 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
336 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2" ]; then
337 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
338 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
339 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1" ]; then
340 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
341 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
344 # clean unneeded files
345 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/config
348 rm -rf $RPM_BUILD_ROOT
351 %defattr(644,root,root,755)
352 %doc LICENSE bugreport
353 %attr(755,root,root) %{_bindir}/*
354 %dir %{_libdir}/opera
355 %dir %{_libdir}/opera/bin
356 %attr(755,root,root) %{_libdir}/opera/bin/*
358 %attr(755,root,root) %{_plugindir}/*
359 %dir %{_datadir}/opera
360 %{_datadir}/opera/*.*
361 %{_datadir}/opera/images
362 %{_datadir}/opera/ini
363 %{_datadir}/opera/java
364 %{_datadir}/opera/skin
365 %{_datadir}/opera/styles
366 %dir %{_datadir}/opera/locale
367 %{_datadir}/opera/locale/en
368 %{_datadir}/opera/locale/english.lng
369 %{_pixmapsdir}/opera.xpm
370 %{_desktopdir}/*.desktop
372 %{_mandir}/man1/opera.1*
374 %config(noreplace) %verify(not md5 size mtime) /etc/opera*rc*