]> git.pld-linux.org Git - packages/opera.git/blame - opera.spec
- drop weekly (see WEEKLY branch) and snap (see DEVEL branch)
[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
6239047a 8#
ec0c336f
AM
9%bcond_without shared # static or shared version
10%bcond_without distributable # distributable or not
11%bcond_without incall # include all tarballs into src.rpm (but splitted into shared/static)
09f2d772 12
a49b769b
AM
13%define ver 9.23
14%define sver 9.23
94132831 15%define fix %{nil}
a49b769b 16%define dirrel 20070809
6f7271b8 17%define reltype final
a49b769b 18%define magicstr 660
e56cf118 19
6fe34fc1 20%define shver %(echo %{ver} | tr -d .)%{fix}
9b787f15 21%define x86_shared_rel %{dirrel}.5
655debcb 22%define x86_static_rel %{dirrel}.1
23%define sparc_shared_rel %{dirrel}.2
24%define sparc_static_rel %{dirrel}.1
a8b8cbf5 25%define ppc_shared_rel %{dirrel}.3
655debcb 26%define ppc_static_rel %{dirrel}.1
ae712f51 27
09f2d772 28%if %{with shared}
655debcb 29%define type shared
0d0211ae 30# We should be able to build src.rpm also on not supported archs
655debcb 31%define rel %{x86_shared_rel}
903d158e 32%ifarch sparc sparcv9
a034ff51 33#%%define rel %{sparc_shared_rel}
34%define rel %{sparc_static_rel}
e1672e97 35%else
7edc0e0c 36%ifarch ppc
655debcb 37%define rel %{ppc_shared_rel}
7edc0e0c 38%endif
e1672e97 39%endif
09f2d772 40%else
655debcb 41%define type static
655debcb 42%define rel %{x86_static_rel}
903d158e 43%ifarch sparc sparcv9
655debcb 44%define rel %{sparc_static_rel}
e1672e97 45%else
7edc0e0c 46%ifarch ppc
655debcb 47%define rel %{ppc_static_rel}
09f2d772 48%endif
7edc0e0c 49%endif
e1672e97 50%endif
2dbc1636 51
b6dbc9f6
AM
52# define to 0 and then redefine to avoid
53# not defined macros
cbb8dbd3 54%define need_ix86_shared 0
55%define need_sparc_shared 0
56%define need_ppc_shared 0
57%define need_ix86_static 0
58%define need_sparc_static 0
59%define need_ppc_static 0
b6dbc9f6 60
40d43d2d 61%if %{with incall}
62# with incall? [if]
40d43d2d 63%if %{with shared}
64# with shared? [if]
65%define need_ix86_shared 1
a034ff51 66#%%define need_sparc_shared 1
67%define need_sparc_static 1
40d43d2d 68%define need_ppc_shared 1
69%else
70# with shared: [else]
71%define need_ix86_static 1
cbb8dbd3 72%define need_sparc_static 1
40d43d2d 73%define need_ppc_static 1
2dbc1636 74%endif
40d43d2d 75# with shared; [endif]
40d43d2d 76%else
77# with incall: [else]
78%ifarch %{ix86}
79# is ix86? [if]
e1672e97 80%else
81# is ix86: [else]
40d43d2d 82%ifarch sparc sparc64
83# is sparc? [if]
40d43d2d 84%if %{with shared}
85# with shared? [if]
a034ff51 86#%%define need_sparc_shared 1
87%define need_sparc_static 1
042a9712 88%else
40d43d2d 89# with shared: [else]
90%define need_sparc_static 1
042a9712 91%endif
40d43d2d 92# with shared; [endif]
e1672e97 93%else
94# is sparc: [else]
40d43d2d 95%ifarch ppc
96# is ppc? [if]
40d43d2d 97%if %{with shared}
98# with shared? [if]
99%define need_ppc_shared 1
100%else
101# with shared: [else]
102%define need_ppc_static 1
2dbc1636 103%endif
e1672e97 104# with shared; [endif]
ec0c336f 105%endif
40d43d2d 106# is ppc; [endif]
2dbc1636 107%endif
e1672e97 108# is sparc; [endif]
109%endif
110# is ix86; [endif]
111%endif
40d43d2d 112# with incall; [endif]
113
ec4223bf 114%define _rel 1
40d43d2d 115Summary: World fastest web browser
0580138e 116Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
40d43d2d 117Name: opera
8ae0cb0b 118Version: %{ver}%{fix}
ae712f51 119Release: %{_rel}
94132831 120Epoch: 2
ae712f51 121License: Distributable
40d43d2d 122Group: X11/Applications/Networking
123
5949283a 124%if %{need_ix86_static}
81a3f5ef 125Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
a49b769b 126# Source0-md5: 0c721abff854df6c8ec7746956a37f55
5949283a 127%{!?with_distributable:NoSource: 0}
128%endif
129
5949283a 130%if %{need_sparc_static}
81a3f5ef 131Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
a49b769b 132# Source1-md5: 98a84755df7d74812e8b8fa20d09d929
7187d619 133%{!?with_distributable:NoSource: 1}
5949283a 134%endif
135
5949283a 136%if %{need_ppc_static}
81a3f5ef 137Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
a49b769b 138# Source2-md5: 132fa2d85a2e0c2840b8bf2d27cfc93d
5949283a 139%{!?with_distributable:NoSource: 2}
140%endif
40d43d2d 141
5949283a 142%if %{need_ix86_shared}
81a3f5ef 143Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
a49b769b 144# Source20-md5: fe3c699c4509788276a94e325cd1bc5b
5949283a 145%{!?with_distributable:NoSource: 20}
146%endif
147
5949283a 148%if %{need_sparc_shared}
81a3f5ef 149Source21: 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 150# Source21-md5: 883df8058672cf52678a07d714dcfce
5949283a 151%{!?with_distributable:NoSource: 21}
152%endif
153
40d43d2d 154
5949283a 155%if %{need_ppc_shared}
81a3f5ef 156Source22: 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 157# Source22-md5: 2f9bf50540fac7ed63f2984a13b1010d
5949283a 158%{!?with_distributable:NoSource: 22}
159%endif
160
2dbc1636 161Source4: %{name}.desktop
35677f25 162Patch0: %{name}-wrapper.patch
8cb331c2 163URL: http://www.opera.com/
f6dbdb8e 164BuildRequires: rpmbuild(macros) >= 1.356
6eebcb83 165BuildRequires: sed >= 4.0
f6dbdb8e 166Requires: browser-plugins >= 2.0
2f4fa75a 167Requires: freetype >= 2
3b8cc5d5 168Provides: wwwbrowser
ae712f51 169ExclusiveArch: %{ix86} ppc sparc sparcv9
8cb331c2 170BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
1e3271ab 171
fa79b8f2 172%define _plugindir %{_libdir}/opera/plugins
7e80713c 173%define _operadocdir %{_docdir}/%{name}-%{ver}
8cb331c2 174
175%description
176Opera is world fastest web browser. It supports most of nowaday
2bc795a6 177extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
a97be43d 178linked with Qt.
8cb331c2 179
14283174
JR
180%description -l pl.UTF-8
181Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
182dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
2bc795a6 183wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
58d714bb 184
8cb331c2 185%prep
643785f9 186%ifarch %{ix86}
ae712f51 187%setup -q -T -b %{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}}
2d8d939d 188%endif
903d158e 189%ifarch sparc sparcv9
ae712f51 190%setup -q -T -b %{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en-en%{?magicstr:-%{magicstr}}
643785f9 191%endif
195ff7d0 192%ifarch ppc
ae712f51 193%setup -q -T -b %{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}}
b966c84f 194%endif
35677f25 195%patch0 -p1
8cb331c2 196
197%install
198rm -rf $RPM_BUILD_ROOT
54d2851e 199install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
8cb331c2 200
f6dbdb8e
ER
201%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
202# opera does not use for .xpt files
203*.xpt
6ab3a1e1
ER
204
205# use mplayerplug-in-opera instead
206mplayerplug-in*
929e48ab
ER
207
208# opera uses libjava.so to run java
209libjavaplugin_oji.so
f6dbdb8e
ER
210EOF
211
51e47e74 212sh install.sh \
7e80713c
KK
213 DESTDIR=$RPM_BUILD_ROOT \
214 --prefix=%{_prefix} \
2d8d939d
ER
215 --exec_prefix=%{_libdir}/%{name}/bin \
216 --plugindir=%{_libdir}/%{name}/plugins \
7e80713c 217 --docdir=%{_operadocdir}
6239047a 218
51e47e74 219# install in kde etc.
7b1a5f81 220install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
a8029af7 221
54d2851e 222mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
bbfb0780 223install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
72b0ae2b 224
8cb331c2 225%clean
226rm -rf $RPM_BUILD_ROOT
227
f6dbdb8e
ER
228%post
229%update_browser_plugins
230
231%postun
232if [ "$1" = 0 ]; then
233 %update_browser_plugins
234fi
235
8cb331c2 236%files
237%defattr(644,root,root,755)
c2ef0548 238%doc LICENSE
54d2851e 239%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
f6dbdb8e
ER
240
241# browser plugins v2
242%{_browserpluginsconfdir}/browsers.d/%{name}.*
243%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
244
1cfa2d1b 245%attr(755,root,root) %{_bindir}/*
1e3271ab 246%dir %{_libdir}/opera
98c525bc
AM
247%dir %{_libdir}/opera/bin
248%attr(755,root,root) %{_libdir}/opera/bin/*
1e3271ab 249%dir %{_plugindir}
51e47e74 250%attr(755,root,root) %{_plugindir}/*
a5b49fac
KK
251%dir %{_datadir}/opera
252%{_datadir}/opera/*.*
a5b49fac
KK
253%{_datadir}/opera/ini
254%{_datadir}/opera/java
ae712f51 255%{_datadir}/opera/images
a5b49fac
KK
256%{_datadir}/opera/skin
257%{_datadir}/opera/styles
f8b4ca83 258%dir %{_datadir}/opera/locale
259%{_datadir}/opera/locale/en
a6bb5241 260%{_datadir}/opera/locale/english.lng
7b1a5f81 261%{_desktopdir}/*.desktop
1e3271ab 262%{_mandir}/man1/opera.1*
7e80713c 263%{_pixmapsdir}/opera.xpm
This page took 0.16206 seconds and 4 git commands to generate.