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