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
11 %define dirrel 20041203
12 %define reltype Preview-4
15 %define dirrel 20040803
19 %define shver %(echo %{ver} | tr -d .)
20 %define x86_shared_rel %{dirrel}.5
21 %define x86_static_rel %{dirrel}.1
22 %define sparc_shared_rel %{dirrel}.2
23 %define sparc_static_rel %{dirrel}.1
24 %define ppc_shared_rel %{dirrel}.2
25 %define ppc_static_rel %{dirrel}.1
28 # We should be able to build src.rpm also on not supported archs
29 %define rel %{x86_shared_rel}
31 %define rel %{sparc_shared_rel}
34 %define rel %{ppc_shared_rel}
38 %define rel %{x86_static_rel}
40 %define rel %{sparc_static_rel}
43 %define rel %{ppc_static_rel}
47 # define to 0 and then redefine to avoid
49 %define need_ix86_shared_snap 0
50 %define need_sparc_shared_snap 0
51 %define need_ppc_shared_snap 0
52 %define need_ix86_static_snap 0
53 %define need_sparc_static_snap 0
54 %define need_ppc_static_snap 0
56 %define need_ix86_shared 0
57 %define need_sparc_shared 0
58 %define need_ppc_shared 0
59 %define need_ix86_static 0
60 %define need_sparc_static 0
61 %define need_ppc_static 0
69 %define need_ix86_shared_snap 1
70 %define need_sparc_shared_snap 1
71 %define need_ppc_shared_snap 1
74 %define need_ix86_static_snap 1
75 %define need_sparc_static_snap 1
76 %define need_ppc_static_snap 1
78 # with shared; [endif]
83 %define need_ix86_shared 1
84 %define need_sparc_shared 1
85 %define need_ppc_shared 1
88 %define need_ix86_static 1
89 %define need_sparc_static 1
90 %define need_ppc_static 1
92 # with shared; [endif]
103 %define need_ix86_shared_snap 1
105 # with shared: [else]
106 %define need_ix86_static_snap 1
108 # with shared; [endif]
113 %define need_ix86_shared 1
115 # with shared: [else]
116 %define need_ix86_static 1
118 # with shared; [endif]
123 %ifarch sparc sparc64
129 %define need_sparc_shared_snap 1
131 # with shared: [else]
132 %define need_sparc_static_snap 1
134 # with shared; [endif]
139 %define need_sparc_shared 1
141 # with shared: [else]
142 %define need_sparc_static 1
144 # with shared; [endif]
155 %define need_ppc_shared_snap 1
157 # with shared: [else]
158 %define need_ppc_static_snap 1
160 # with shared; [endif]
165 %define need_ppc_shared 1
167 # with shared: [else]
168 %define need_ppc_static 1
170 # with shared; [endif
176 # with incall; [endif]
178 Summary: World fastest web browser
179 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
181 Version: %{ver}%{?with_snap:.%{rel}}
184 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
185 Group: X11/Applications/Networking
187 %if %{need_ix86_static}
188 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{ver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
189 # Source0-md5: 0a7e933ef593d4b7a897041c9f87bba2
190 %{!?with_distributable:NoSource: 0}
193 %if %{need_ix86_static_snap}
194 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{ver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
195 %{!?with_distributable:NoSource: 100}
198 %if %{need_sparc_static}
199 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{ver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
200 # Source1-md5: 04976a6ace7a4345ce5e4cf763159939
201 %{!?with_distributable:NoSource: 1}
204 %if %{need_sparc_static_snap}
205 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{ver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
206 # Source101-md5: 793af778c64d49299cbfe0f8e07ff7c4
207 %{!?with_distributable:NoSource: 101}
210 %if %{need_ppc_static}
211 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{ver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
212 # Source2-md5: c11a4c78d18bdaa4bd338b4c0dc27f38
213 %{!?with_distributable:NoSource: 2}
216 %if %{need_ppc_static_snap}
217 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{ver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
218 %{!?with_distributable:NoSource: 102}
221 %if %{need_ix86_shared}
222 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{ver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
223 # Source20-md5: 0e407a050f3aa4559011a3cea707cd20
224 %{!?with_distributable:NoSource: 20}
227 %if %{need_ix86_shared_snap}
228 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{ver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
229 # Source1020-md5: 827f62ae5781e4f66c0d30c39723dae9
230 %{!?with_distributable:NoSource: 1020}
233 %if %{need_sparc_shared}
234 Source21: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/shared/gcc-2.95/%{name}-%{ver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
235 # Source21-md5: d8635013dac0c98c680997fcc9dd66c4
236 %{!?with_distributable:NoSource: 21}
239 %if %{need_ix86_shared_snap}
240 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{ver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
241 # Source1021-md5: 16c77233c49ac600bed54c61898c15b7
242 %{!?with_distributable:NoSource: 1021}
245 %if %{need_ppc_shared}
246 Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/gcc-2.95/%{name}-%{ver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
247 # Source22-md5: 516992e68c5a710d795a1ecc791c7f4d
248 %{!?with_distributable:NoSource: 22}
251 %if %{need_ppc_shared_snap}
252 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{ver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
253 # Source1022-md5: dfa0173345f3807cc5425a7903e24cb1
254 %{!?with_distributable:NoSource: 1022}
257 Source4: %{name}.desktop
259 URL: http://www.opera.com/
260 ExclusiveArch: %{ix86} ppc sparc sparc64
261 Requires: freetype >= 2
262 Requires: openmotif >= 2
263 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
265 %define _plugindir %{_libdir}/opera/plugins
266 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
267 %define configfile %{_datadir}/opera/config/opera6rc
270 Opera is world fastest web browser. It supports most of nowaday
271 extensions of HTML. And it is quite stable. Only disadvantage are
272 advertisements on the top of its window. Version static linked with
276 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
277 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Jedyn±
278 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
279 statycznie skonsolidowana z qt.
283 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{ver}-%{rel}-%{type}-qt.i386-en
285 %ifarch sparc sparc64
286 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{ver}-%{rel}-%{type}-qt.sparc-en
289 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{ver}-%{rel}-%{type}-qt.ppc-en
293 rm -rf $RPM_BUILD_ROOT
295 install -d $RPM_BUILD_ROOT{/etc,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
297 cat install.sh | sed 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' > install2.sh
298 mv install2.sh install.sh
302 --prefix=$RPM_BUILD_ROOT%{_prefix} \
303 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
304 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
305 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
306 --exec_prefix=$RPM_BUILD_ROOT%{_datadir}/opera/bin \
307 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
310 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
313 sed s#$RPM_BUILD_ROOT## > $RPM_BUILD_ROOT%{_bindir}/opera2 $RPM_BUILD_ROOT%{_bindir}/opera
314 mv $RPM_BUILD_ROOT%{_bindir}/opera2 $RPM_BUILD_ROOT%{_bindir}/opera
316 # install in kde etc.
317 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
319 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
321 # symlink który niweluje burkanie siê opery :>
322 #ln -sf %{_datadir}/opera/ $RPM_BUILD_ROOT/usr/share/
323 #ln -sf %{_libdir}/opera $RPM_BUILD_ROOT/usr/lib/
325 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
327 # always use wrapper linked with libXm.so.3
328 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
329 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
330 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
332 # %{_libdir} is not the best place for it but opera doesn't search for it in better
334 install lib/spellcheck.so $RPM_BUILD_ROOT%{_libdir}
337 rm -rf $RPM_BUILD_ROOT
340 %defattr(644,root,root,755)
341 %doc LICENSE bugreport help
342 %attr(755,root,root) %{_bindir}/*
343 %dir %{_datadir}/opera
344 %dir %{_datadir}/opera/bin
345 %attr(755,root,root) %{_datadir}/opera/bin/*
346 %{_datadir}/opera/config
347 %{_datadir}/opera/help
348 %{_datadir}/opera/images
349 %{_datadir}/opera/java
350 %{_datadir}/opera/skin
351 %{_datadir}/opera/styles
352 %{_datadir}/opera/ini
353 %{_datadir}/opera/search.ini
354 %{_datadir}/opera/*.ssr
355 %{_datadir}/opera/*.txt
357 %attr(755,root,root) %{_datadir}/opera/chartables.bin
360 %attr(755,root,root) %{_datadir}/opera/chartables-be.bin
362 %attr(755,root,root) %{_datadir}/opera/opera6.adr
363 %attr(755,root,root) %{_libdir}/*.so
364 %dir %{_libdir}/opera
366 %attr(755,root,root) %{_plugindir}/*
368 %dir %{_datadir}/opera/locale
369 %{_datadir}/opera/locale/en
370 %{_datadir}/opera/locale/english.lng
372 %{_pixmapsdir}/opera.xpm
373 %{_desktopdir}/*.desktop
375 %{_mandir}/man1/opera.1*
377 %config(noreplace) %verify(not md5 size mtime) /etc/opera*rc*