]> git.pld-linux.org Git - packages/opera.git/blame - opera.spec
- speadup for new specparser.pl (about 600 posibilities instead of 6000)
[packages/opera.git] / opera.spec
CommitLineData
11dece16 1# TODO:
da8a77bf 2# - move translations into a separate, noarch package
6239047a 3#
ec0c336f
AM
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)
e56cf118 7%bcond_with snap # snap version
7f13a385 8%bcond_with weekly # weekly snapshot version
09f2d772 9
e1672e97 10%ifarch sparc sparc64
08bc83d7 11%undefine with_shared
1b3f992f 12%endif
13
7f13a385 14%if %{with weekly}
37e8381c 15%define ver 9.20
7f13a385
KK
16%define sver %{ver}
17%define fix %{nil}
d6cbd1ec
AM
18%define dirrel 20070228
19%define magicstr 577
7f13a385
KK
20%define with_snap 1
21%else
e56cf118 22%if %{with snap}
b28972ca 23%define ver 9.0
7ad274ec 24%define sver %{ver}
6fe34fc1 25%define fix %{nil}
3a879908
AM
26%define dirrel 20060206
27%define reltype Preview-2
b28972ca 28%define magicstr %{nil}
e56cf118 29%else
9ce6f870
AM
30%define ver 9.10
31%define sver 9.10
94132831 32%define fix %{nil}
9ce6f870 33%define dirrel 20061214
6f7271b8 34%define reltype final
9ce6f870 35%define magicstr 521
e56cf118 36%endif
7f13a385 37%endif
e56cf118 38
6fe34fc1 39%define shver %(echo %{ver} | tr -d .)%{fix}
9b787f15 40%define x86_shared_rel %{dirrel}.5
655debcb 41%define x86_static_rel %{dirrel}.1
42%define sparc_shared_rel %{dirrel}.2
43%define sparc_static_rel %{dirrel}.1
a8b8cbf5 44%define ppc_shared_rel %{dirrel}.3
655debcb 45%define ppc_static_rel %{dirrel}.1
09f2d772 46%if %{with shared}
655debcb 47%define type shared
0d0211ae 48# We should be able to build src.rpm also on not supported archs
655debcb 49%define rel %{x86_shared_rel}
e1672e97 50%ifarch sparc sparc64
a034ff51 51#%%define rel %{sparc_shared_rel}
52%define rel %{sparc_static_rel}
e1672e97 53%else
7edc0e0c 54%ifarch ppc
655debcb 55%define rel %{ppc_shared_rel}
7edc0e0c 56%endif
e1672e97 57%endif
09f2d772 58%else
655debcb 59%define type static
655debcb 60%define rel %{x86_static_rel}
7edc0e0c 61%ifarch sparc sparc64
655debcb 62%define rel %{sparc_static_rel}
e1672e97 63%else
7edc0e0c 64%ifarch ppc
655debcb 65%define rel %{ppc_static_rel}
09f2d772 66%endif
7edc0e0c 67%endif
e1672e97 68%endif
2dbc1636 69
b6dbc9f6
AM
70# define to 0 and then redefine to avoid
71# not defined macros
cbb8dbd3 72%define need_ix86_shared_snap 0
73%define need_sparc_shared_snap 0
74%define need_ppc_shared_snap 0
75%define need_ix86_static_snap 0
76%define need_sparc_static_snap 0
77%define need_ppc_static_snap 0
b6dbc9f6 78
cbb8dbd3 79%define need_ix86_shared 0
80%define need_sparc_shared 0
81%define need_ppc_shared 0
82%define need_ix86_static 0
83%define need_sparc_static 0
84%define need_ppc_static 0
b6dbc9f6 85
40d43d2d 86%if %{with incall}
87# with incall? [if]
88%if %{with snap}
89# with snap? [if]
90%if %{with shared}
91# with shared? [if]
92%define need_ix86_shared_snap 1
b28972ca 93%define need_sparc_shared_snap 0
40d43d2d 94%define need_ppc_shared_snap 1
042a9712 95%else
40d43d2d 96# with shared: [else]
97%define need_ix86_static_snap 1
7f13a385 98%define need_sparc_static_snap 1
40d43d2d 99%define need_ppc_static_snap 1
042a9712 100%endif
40d43d2d 101# with shared; [endif]
102%else
103# with snap: [else]
104%if %{with shared}
105# with shared? [if]
106%define need_ix86_shared 1
a034ff51 107#%%define need_sparc_shared 1
108%define need_sparc_static 1
40d43d2d 109%define need_ppc_shared 1
110%else
111# with shared: [else]
112%define need_ix86_static 1
cbb8dbd3 113%define need_sparc_static 1
40d43d2d 114%define need_ppc_static 1
2dbc1636 115%endif
40d43d2d 116# with shared; [endif]
ec0c336f 117%endif
40d43d2d 118# with snap; [endif]
119%else
120# with incall: [else]
121%ifarch %{ix86}
122# is ix86? [if]
123%if %{with snap}
124# with snap? [if]
125%if %{with shared}
126# with shared? [if]
127%define need_ix86_shared_snap 1
042a9712 128%else
40d43d2d 129# with shared: [else]
130%define need_ix86_static_snap 1
042a9712 131%endif
40d43d2d 132# with shared; [endif]
133%else
134# with snap: [else]
135%if %{with shared}
136# with shared? [if]
137%define need_ix86_shared 1
138%else
139# with shared: [else]
140%define need_ix86_static 1
2dbc1636 141%endif
40d43d2d 142# with shared; [endif]
ec0c336f 143%endif
40d43d2d 144# with snap; [endif]
e1672e97 145%else
146# is ix86: [else]
40d43d2d 147%ifarch sparc sparc64
148# is sparc? [if]
149%if %{with snap}
150# with snap? [if]
151%if %{with shared}
152# with shared? [if]
153%define need_sparc_shared_snap 1
042a9712 154%else
40d43d2d 155# with shared: [else]
156%define need_sparc_static_snap 1
2dbc1636 157%endif
40d43d2d 158# with shared; [endif]
2dbc1636 159%else
40d43d2d 160# with snap: [else]
161%if %{with shared}
162# with shared? [if]
a034ff51 163#%%define need_sparc_shared 1
164%define need_sparc_static 1
042a9712 165%else
40d43d2d 166# with shared: [else]
167%define need_sparc_static 1
042a9712 168%endif
40d43d2d 169# with shared; [endif]
2dbc1636 170%endif
40d43d2d 171# with snap; [endif]
e1672e97 172%else
173# is sparc: [else]
40d43d2d 174%ifarch ppc
175# is ppc? [if]
176%if %{with snap}
177# with snap? [if]
178%if %{with shared}
179# with shared? [if]
180%define need_ppc_shared_snap 1
042a9712 181%else
40d43d2d 182# with shared: [else]
183%define need_ppc_static_snap 1
042a9712 184%endif
40d43d2d 185# with shared; [endif]
186%else
187# with snap: [else]
188%if %{with shared}
189# with shared? [if]
190%define need_ppc_shared 1
191%else
192# with shared: [else]
193%define need_ppc_static 1
2dbc1636 194%endif
e1672e97 195# with shared; [endif]
ec0c336f 196%endif
e1672e97 197# with snap; [endif]
2dbc1636 198%endif
40d43d2d 199# is ppc; [endif]
2dbc1636 200%endif
e1672e97 201# is sparc; [endif]
202%endif
203# is ix86; [endif]
204%endif
40d43d2d 205# with incall; [endif]
206
054eb516
AM
207%if %{with weekly}
208%define need_ppc_shared_snap 0
209%define need_ppc_static_snap 0
210%define need_sparc_shared_snap 0
211%define need_sparc_static_snap 0
212%endif
213
f6dbdb8e 214%define _rel 4
40d43d2d 215Summary: World fastest web browser
0580138e 216Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
40d43d2d 217Name: opera
8ae0cb0b 218Version: %{ver}%{fix}
35677f25 219Release: %{?with_snap:1.%{rel}.}%{_rel}
94132831 220Epoch: 2
40d43d2d 221License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
222Group: X11/Applications/Networking
223
5949283a 224%if %{need_ix86_static}
81a3f5ef 225Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
9ce6f870 226# Source0-md5: dccdc5252ffc6658f3c46f32c64c8219
5949283a 227%{!?with_distributable:NoSource: 0}
228%endif
229
230%if %{need_ix86_static_snap}
7f13a385 231%if %{with weekly}
e886c59d 232Source30100: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
7f13a385 233%else
a06b78c5 234Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
7f13a385 235%endif
5949283a 236%{!?with_distributable:NoSource: 100}
237%endif
40d43d2d 238
5949283a 239%if %{need_sparc_static}
81a3f5ef 240Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
9ce6f870 241# Source1-md5: e7bcbbaa48a63827d0efc60cf6fef68d
7187d619 242%{!?with_distributable:NoSource: 1}
5949283a 243%endif
244
245%if %{need_sparc_static_snap}
b28972ca 246Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
9b787f15 247# Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1
5949283a 248%{!?with_distributable:NoSource: 101}
249%endif
40d43d2d 250
5949283a 251%if %{need_ppc_static}
81a3f5ef 252Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
9ce6f870 253# Source2-md5: d67428a09a036e786efc22e03150a344
5949283a 254%{!?with_distributable:NoSource: 2}
255%endif
40d43d2d 256
5949283a 257%if %{need_ppc_static_snap}
7f13a385 258%if %{with weekly}
d6e41d46 259Source30102: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
7f13a385 260%else
b28972ca 261Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
7f13a385 262%endif
5949283a 263%{!?with_distributable:NoSource: 102}
264%endif
265
266%if %{need_ix86_shared}
81a3f5ef 267Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
9ce6f870 268# Source20-md5: a60b0abe55ca580952b30f4540632425
5949283a 269%{!?with_distributable:NoSource: 20}
270%endif
271
272%if %{need_ix86_shared_snap}
7f13a385 273%if %{with weekly}
e886c59d 274Source301020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
d6cbd1ec 275# Source301020-md5: d688cee8c7c038be9c85588bc8182c02
7f13a385 276%else
b28972ca 277Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
3a879908 278# Source1020-md5: 6f296be6b9fc3001588d4509016062bd
5949283a 279%{!?with_distributable:NoSource: 1020}
280%endif
9530914d 281%endif
40d43d2d 282
5949283a 283%if %{need_sparc_shared}
81a3f5ef 284Source21: 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
9b787f15 285# Source21-md5: 883df8058672cf52678a07d714dcfce
5949283a 286%{!?with_distributable:NoSource: 21}
287%endif
288
aefb57ae 289%if %{need_sparc_shared_snap}
b28972ca 290Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
da3e18bd 291# Source1021-md5: e190021f5530de3f711006cd9f6bb339
5949283a 292%{!?with_distributable:NoSource: 1021}
293%endif
40d43d2d 294
5949283a 295%if %{need_ppc_shared}
81a3f5ef 296Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/gcc-2.95/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
9ce6f870 297# Source22-md5: 6ef04f12a39fdbe671dfbd6a37080a81
5949283a 298%{!?with_distributable:NoSource: 22}
299%endif
300
301%if %{need_ppc_shared_snap}
7f13a385 302%if %{with weekly}
d6e41d46 303Source301022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
b387aa03 304# Source301022-md5: 65293d788e18d0c23cccac71b9fe567c
7f13a385 305%else
b28972ca 306Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
3a879908 307# Source1022-md5: 74985fa6da49b2e54c9d03dab1119325
5949283a 308%{!?with_distributable:NoSource: 1022}
309%endif
9530914d 310%endif
40d43d2d 311
2dbc1636 312Source4: %{name}.desktop
35677f25 313Patch0: %{name}-wrapper.patch
8cb331c2 314URL: http://www.opera.com/
f6dbdb8e 315BuildRequires: rpmbuild(macros) >= 1.356
6eebcb83 316BuildRequires: sed >= 4.0
f6dbdb8e 317Requires: browser-plugins >= 2.0
2f4fa75a 318Requires: freetype >= 2
3b8cc5d5 319Provides: wwwbrowser
320ExclusiveArch: %{ix86} ppc sparc sparc64
8cb331c2 321BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
1e3271ab 322
fa79b8f2 323%define _plugindir %{_libdir}/opera/plugins
7e80713c 324%define _operadocdir %{_docdir}/%{name}-%{ver}
8cb331c2 325
326%description
327Opera is world fastest web browser. It supports most of nowaday
2bc795a6 328extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
a97be43d 329linked with Qt.
8cb331c2 330
14283174
JR
331%description -l pl.UTF-8
332Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
333dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
2bc795a6 334wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
58d714bb 335
8cb331c2 336%prep
643785f9 337%ifarch %{ix86}
81a3f5ef 338%setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}}
643785f9 339%endif
5308ba56 340%ifarch sparc sparc64
81a3f5ef 341%setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en%{?magicstr:-%{magicstr}}
643785f9 342%endif
195ff7d0 343%ifarch ppc
81a3f5ef 344%setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}}
b966c84f 345%endif
35677f25 346%patch0 -p1
8cb331c2 347
348%install
349rm -rf $RPM_BUILD_ROOT
54d2851e 350install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
8cb331c2 351
f6dbdb8e
ER
352%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
353# opera does not use for .xpt files
354*.xpt
6ab3a1e1
ER
355
356# use mplayerplug-in-opera instead
357mplayerplug-in*
929e48ab
ER
358
359# opera uses libjava.so to run java
360libjavaplugin_oji.so
f6dbdb8e
ER
361EOF
362
51e47e74 363sh install.sh \
7e80713c
KK
364 DESTDIR=$RPM_BUILD_ROOT \
365 --prefix=%{_prefix} \
366 --exec_prefix=%{_libdir}/opera/bin \
367 --docdir=%{_operadocdir}
6239047a 368
51e47e74 369# install in kde etc.
1e3271ab 370install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
7b1a5f81 371install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
a8029af7 372
54d2851e 373mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
72b0ae2b 374
8cb331c2 375%clean
376rm -rf $RPM_BUILD_ROOT
377
f6dbdb8e
ER
378%post
379%update_browser_plugins
380
381%postun
382if [ "$1" = 0 ]; then
383 %update_browser_plugins
384fi
385
8cb331c2 386%files
387%defattr(644,root,root,755)
c2ef0548 388%doc LICENSE
54d2851e 389%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
f6dbdb8e
ER
390
391# browser plugins v2
392%{_browserpluginsconfdir}/browsers.d/%{name}.*
393%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
394
1cfa2d1b 395%attr(755,root,root) %{_bindir}/*
1e3271ab 396%dir %{_libdir}/opera
98c525bc
AM
397%dir %{_libdir}/opera/bin
398%attr(755,root,root) %{_libdir}/opera/bin/*
1e3271ab 399%dir %{_plugindir}
51e47e74 400%attr(755,root,root) %{_plugindir}/*
a5b49fac
KK
401%dir %{_datadir}/opera
402%{_datadir}/opera/*.*
403%{_datadir}/opera/images
404%{_datadir}/opera/ini
405%{_datadir}/opera/java
406%{_datadir}/opera/skin
407%{_datadir}/opera/styles
f8b4ca83 408%dir %{_datadir}/opera/locale
409%{_datadir}/opera/locale/en
a6bb5241 410%{_datadir}/opera/locale/english.lng
7b1a5f81 411%{_desktopdir}/*.desktop
1e3271ab 412%{_mandir}/man1/opera.1*
7e80713c 413%{_pixmapsdir}/opera.xpm
This page took 0.199807 seconds and 4 git commands to generate.