2 # - move translations into a separate, noarch package
5 %bcond_without shared # static or shared version
6 %bcond_without distributable # distributable or not
7 %bcond_without incall # include all tarballs into src.rpm (but splitted into shared/static)
8 %bcond_with snap # snap version
14 %define dirrel 20041203
15 %define reltype Preview-4
20 %define dirrel 20050415
24 %define shver %(echo %{ver} | tr -d .)%{fix}
25 %define x86_shared_rel %{dirrel}.4
26 %define x86_static_rel %{dirrel}.1
27 %define sparc_shared_rel %{dirrel}.2
28 %define sparc_static_rel %{dirrel}.1
29 %define ppc_shared_rel %{dirrel}.3
30 %define ppc_static_rel %{dirrel}.1
33 # We should be able to build src.rpm also on not supported archs
34 %define rel %{x86_shared_rel}
36 %define rel %{sparc_shared_rel}
39 %define rel %{ppc_shared_rel}
43 %define rel %{x86_static_rel}
45 %define rel %{sparc_static_rel}
48 %define rel %{ppc_static_rel}
52 # define to 0 and then redefine to avoid
54 %define need_ix86_shared_snap 0
55 %define need_sparc_shared_snap 0
56 %define need_ppc_shared_snap 0
57 %define need_ix86_static_snap 0
58 %define need_sparc_static_snap 0
59 %define need_ppc_static_snap 0
61 %define need_ix86_shared 0
62 %define need_sparc_shared 0
63 %define need_ppc_shared 0
64 %define need_ix86_static 0
65 %define need_sparc_static 0
66 %define need_ppc_static 0
74 %define need_ix86_shared_snap 1
75 %define need_sparc_shared_snap 1
76 %define need_ppc_shared_snap 1
79 %define need_ix86_static_snap 1
80 %define need_sparc_static_snap 1
81 %define need_ppc_static_snap 1
83 # with shared; [endif]
88 %define need_ix86_shared 1
89 %define need_sparc_shared 1
90 %define need_ppc_shared 1
93 %define need_ix86_static 1
94 %define need_sparc_static 1
95 %define need_ppc_static 1
97 # with shared; [endif]
101 # with incall: [else]
108 %define need_ix86_shared_snap 1
110 # with shared: [else]
111 %define need_ix86_static_snap 1
113 # with shared; [endif]
118 %define need_ix86_shared 1
120 # with shared: [else]
121 %define need_ix86_static 1
123 # with shared; [endif]
128 %ifarch sparc sparc64
134 %define need_sparc_shared_snap 1
136 # with shared: [else]
137 %define need_sparc_static_snap 1
139 # with shared; [endif]
144 %define need_sparc_shared 1
146 # with shared: [else]
147 %define need_sparc_static 1
149 # with shared; [endif]
160 %define need_ppc_shared_snap 1
162 # with shared: [else]
163 %define need_ppc_static_snap 1
165 # with shared; [endif]
170 %define need_ppc_shared 1
172 # with shared: [else]
173 %define need_ppc_static 1
175 # with shared; [endif
181 # with incall; [endif]
183 Summary: World fastest web browser
184 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
186 Version: %{ver}%{fix}%{?with_snap:.%{rel}}
189 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
190 Group: X11/Applications/Networking
192 %if %{need_ix86_static}
193 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
194 # Source0-md5: 94d1d86f42d9aa912c288e47c4b3893f
195 %{!?with_distributable:NoSource: 0}
198 %if %{need_ix86_static_snap}
199 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
200 %{!?with_distributable:NoSource: 100}
203 %if %{need_sparc_static}
204 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
205 # Source1-md5: da6f20e3e881ca3c92024758dbe473d2
206 %{!?with_distributable:NoSource: 1}
209 %if %{need_sparc_static_snap}
210 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
211 # Source101-md5: 793af778c64d49299cbfe0f8e07ff7c4
212 %{!?with_distributable:NoSource: 101}
215 %if %{need_ppc_static}
216 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
217 # Source2-md5: 5fe172a95df147f709af5bff021edc15
218 %{!?with_distributable:NoSource: 2}
221 %if %{need_ppc_static_snap}
222 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
223 %{!?with_distributable:NoSource: 102}
226 %if %{need_ix86_shared}
227 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
228 # Source20-md5: d48b48ffbdae4a452e626c56078b7ca8
229 %{!?with_distributable:NoSource: 20}
232 %if %{need_ix86_shared_snap}
233 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
234 # Source1020-md5: 827f62ae5781e4f66c0d30c39723dae9
235 %{!?with_distributable:NoSource: 1020}
238 %if %{need_sparc_shared}
239 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
240 # Source21-md5: 883df8058672cf52678a07d7194dcfce
241 %{!?with_distributable:NoSource: 21}
244 %if %{need_ix86_shared_snap}
245 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
246 # Source1021-md5: 16c77233c49ac600bed54c61898c15b7
247 %{!?with_distributable:NoSource: 1021}
250 %if %{need_ppc_shared}
251 Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
252 # Source22-md5: eae16c9b27e39376a89fe87eeddbe7bc
253 %{!?with_distributable:NoSource: 22}
256 %if %{need_ppc_shared_snap}
257 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
258 # Source1022-md5: dfa0173345f3807cc5425a7903e24cb1
259 %{!?with_distributable:NoSource: 1022}
262 Source4: %{name}.desktop
264 URL: http://www.opera.com/
265 ExclusiveArch: %{ix86} ppc sparc sparc64
266 Requires: freetype >= 2
267 Requires: openmotif >= 2
268 BuildRequires: sed >= 4.0
269 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
271 %define _plugindir %{_libdir}/opera/plugins
272 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
273 %define configfile %{_datadir}/opera/config/opera6rc
276 Opera is world fastest web browser. It supports most of nowaday
277 extensions of HTML. And it is quite stable. Only disadvantage are
278 advertisements on the top of its window. Version static linked with
282 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
283 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Jedyn±
284 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
285 statycznie skonsolidowana z qt.
289 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en
291 %ifarch sparc sparc64
292 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
295 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en
299 rm -rf $RPM_BUILD_ROOT
301 install -d $RPM_BUILD_ROOT{/etc,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
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}/*
356 # XXX duplicate files
358 %dir %{_datadir}/opera/locale
359 %{_datadir}/opera/locale/en
360 %{_datadir}/opera/locale/english.lng
362 %{_pixmapsdir}/opera.xpm
363 %{_desktopdir}/*.desktop
365 %{_mandir}/man1/opera.1*
367 %config(noreplace) %verify(not md5 size mtime) /etc/opera*rc*