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 20041203
14 %define reltype Preview-4
19 %define dirrel 20050316
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: 85dc3af6c02ca6af0d8ba25e76906779
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: b2c09c83f6dd4742268b6f064f6d346e
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: 793af778c64d49299cbfe0f8e07ff7c4
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: d95ad00865ffa30e558280d8743c5824
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: 38e978828d5544745972ad2e2aa75d49
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: 827f62ae5781e4f66c0d30c39723dae9
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: 89514eb6c3f62c942e3ae8743ffa9da9
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: 16c77233c49ac600bed54c61898c15b7
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: dbbce08ef31f97b06bc3834bb2ed79e5
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: dfa0173345f3807cc5425a7903e24cb1
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 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
269 %define _plugindir %{_libdir}/opera/plugins
270 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
271 %define configfile %{_datadir}/opera/config/opera6rc
274 Opera is world fastest web browser. It supports most of nowaday
275 extensions of HTML. And it is quite stable. Only disadvantage are
276 advertisements on the top of its window. Version static linked with
280 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
281 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Jedyn±
282 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
283 statycznie skonsolidowana z qt.
287 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en
289 %ifarch sparc sparc64
290 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
293 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en
297 rm -rf $RPM_BUILD_ROOT
299 install -d $RPM_BUILD_ROOT{/etc,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
301 cat install.sh | sed 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' > install2.sh
302 mv install2.sh install.sh
306 --prefix=$RPM_BUILD_ROOT%{_prefix} \
307 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
308 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
309 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
310 --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
311 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
314 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
317 sed s#$RPM_BUILD_ROOT## > $RPM_BUILD_ROOT%{_bindir}/opera2 $RPM_BUILD_ROOT%{_bindir}/opera
318 mv $RPM_BUILD_ROOT%{_bindir}/opera2 $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}/*
351 %dir %{_libdir}/opera
352 %dir %{_libdir}/opera/bin
353 %attr(755,root,root) %{_libdir}/opera/bin/*
355 %attr(755,root,root) %{_plugindir}/*
357 %dir %{_datadir}/opera/locale
358 %{_datadir}/opera/locale/en
359 %{_datadir}/opera/locale/english.lng
361 %{_pixmapsdir}/opera.xpm
362 %{_desktopdir}/*.desktop
364 %{_mandir}/man1/opera.1*
366 %config(noreplace) %verify(not md5 size mtime) /etc/opera*rc*