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