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