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 20050602
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}
40 %define rel %{sparc_static_rel}
43 %define rel %{ppc_shared_rel}
47 %define rel %{x86_static_rel}
49 %define rel %{sparc_static_rel}
52 %define rel %{ppc_static_rel}
56 # define to 0 and then redefine to avoid
58 %define need_ix86_shared_snap 0
59 %define need_sparc_shared_snap 0
60 %define need_ppc_shared_snap 0
61 %define need_ix86_static_snap 0
62 %define need_sparc_static_snap 0
63 %define need_ppc_static_snap 0
65 %define need_ix86_shared 0
66 %define need_sparc_shared 0
67 %define need_ppc_shared 0
68 %define need_ix86_static 0
69 %define need_sparc_static 0
70 %define need_ppc_static 0
78 %define need_ix86_shared_snap 1
79 %define need_sparc_shared_snap 1
80 %define need_ppc_shared_snap 1
83 %define need_ix86_static_snap 1
84 %define need_sparc_static_snap 1
85 %define need_ppc_static_snap 1
87 # with shared; [endif]
92 %define need_ix86_shared 1
93 #%%define need_sparc_shared 1
94 %define need_sparc_static 1
95 %define need_ppc_shared 1
98 %define need_ix86_static 1
99 %define need_sparc_static 1
100 %define need_ppc_static 1
102 # with shared; [endif]
106 # with incall: [else]
113 %define need_ix86_shared_snap 1
115 # with shared: [else]
116 %define need_ix86_static_snap 1
118 # with shared; [endif]
123 %define need_ix86_shared 1
125 # with shared: [else]
126 %define need_ix86_static 1
128 # with shared; [endif]
133 %ifarch sparc sparc64
139 %define need_sparc_shared_snap 1
141 # with shared: [else]
142 %define need_sparc_static_snap 1
144 # with shared; [endif]
149 #%%define need_sparc_shared 1
150 %define need_sparc_static 1
152 # with shared: [else]
153 %define need_sparc_static 1
155 # with shared; [endif]
166 %define need_ppc_shared_snap 1
168 # with shared: [else]
169 %define need_ppc_static_snap 1
171 # with shared; [endif]
176 %define need_ppc_shared 1
178 # with shared: [else]
179 %define need_ppc_static 1
181 # with shared; [endif
187 # with incall; [endif]
189 Summary: World fastest web browser
190 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
192 Version: %{ver}%{fix}
193 Release: %{?with_snap:0.%{rel}.}1
195 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
196 Group: X11/Applications/Networking
198 %if %{need_ix86_static}
199 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
200 # Source0-md5: 94d1d86f42d9aa912c288e47c4b3893f
201 %{!?with_distributable:NoSource: 0}
204 %if %{need_ix86_static_snap}
205 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
206 %{!?with_distributable:NoSource: 100}
209 %if %{need_sparc_static}
210 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/en/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
211 # Source1-md5: a2a0eab9c4e45d55f2b93c87c80448be
212 %{!?with_distributable:NoSource: 1}
215 %if %{need_sparc_static_snap}
216 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
217 # Source101-md5: 913ccb28106f9f5acd3d9e4c8dc71ae1
218 %{!?with_distributable:NoSource: 101}
221 %if %{need_ppc_static}
222 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
223 # Source2-md5: 5fe172a95df147f709af5bff021edc15
224 %{!?with_distributable:NoSource: 2}
227 %if %{need_ppc_static_snap}
228 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
229 %{!?with_distributable:NoSource: 102}
232 %if %{need_ix86_shared}
233 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
234 # Source20-md5: 1cf47863f9fd9d5838b704481beb7c1a
235 %{!?with_distributable:NoSource: 20}
238 %if %{need_ix86_shared_snap}
239 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
240 # Source1020-md5: e3602032ae454a86cc2854685043c1aa
241 %{!?with_distributable:NoSource: 1020}
244 %if %{need_sparc_shared}
245 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
246 # Source21-md5: 883df8058672cf52678a07d7194dcfce
247 %{!?with_distributable:NoSource: 21}
250 %if %{need_sparc_shared_snap}
251 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
252 # Source1021-md5: e98aeabb57962b6577a10d43c7b3efa0
253 %{!?with_distributable:NoSource: 1021}
256 %if %{need_ppc_shared}
257 Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
258 # Source22-md5: b005627dadd4664e6b2ff06b860d1e33
259 %{!?with_distributable:NoSource: 22}
262 %if %{need_ppc_shared_snap}
263 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
264 # Source1022-md5: 50836edd6eae80c202edea641229a902
265 %{!?with_distributable:NoSource: 1022}
268 Source4: %{name}.desktop
270 URL: http://www.opera.com/
271 ExclusiveArch: %{ix86} ppc sparc sparc64
272 Requires: freetype >= 2
273 Requires: openmotif >= 2
274 BuildRequires: sed >= 4.0
275 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
277 %define _plugindir %{_libdir}/opera/plugins
278 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
279 %define configfile %{_datadir}/opera/config/opera6rc
282 Opera is world fastest web browser. It supports most of nowaday
283 extensions of HTML. And it is quite stable. Only disadvantage are
284 advertisements on the top of its window. Version static linked with
288 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
289 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Jedyn±
290 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
291 statycznie skonsolidowana z qt.
295 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en
297 %ifarch sparc sparc64
298 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
301 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en
305 rm -rf $RPM_BUILD_ROOT
307 install -d $RPM_BUILD_ROOT{/etc,%{_libdir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
308 ln -s $RPM_BUILD_ROOT/etc $RPM_BUILD_ROOT%{_prefix}/etc
310 sed -i -e 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' install.sh
314 --prefix=$RPM_BUILD_ROOT%{_prefix} \
315 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
316 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
317 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
318 --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
319 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
322 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
325 sed -i -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{_bindir}/opera
327 # install in kde etc.
328 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
330 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
332 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
334 # always use latest possible wrapper
335 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
336 if [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3" ]; then
337 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
338 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
339 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2" ]; then
340 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
341 ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
342 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1" ]; then
343 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
344 ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
347 # clean unneeded files
348 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/config
351 rm -rf $RPM_BUILD_ROOT
354 %defattr(644,root,root,755)
355 %doc LICENSE bugreport
356 %attr(755,root,root) %{_bindir}/*
357 %dir %{_libdir}/opera
358 %dir %{_libdir}/opera/bin
359 %attr(755,root,root) %{_libdir}/opera/bin/*
361 %attr(755,root,root) %{_plugindir}/*
362 %dir %{_datadir}/opera
363 %{_datadir}/opera/*.*
364 %{_datadir}/opera/images
365 %{_datadir}/opera/ini
366 %{_datadir}/opera/java
367 %{_datadir}/opera/skin
368 %{_datadir}/opera/styles
369 %dir %{_datadir}/opera/locale
370 %{_datadir}/opera/locale/en
371 %{_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*