]> git.pld-linux.org Git - packages/opera.git/blame - opera.spec
logical order
[packages/opera.git] / opera.spec
CommitLineData
a79ddb02
AM
1# BRANCHES:
2# - HEAD - stable version
3# - DEVEL - development version
083d2812 4# - WEEKLY - weekly development version
ad7d3ceb 5# - NEXT - opera next
083d2812
AM
6#
7# NOTE: to avoid creating unreadable/unmaintainable spec:
8# - don't put static version here, create STATIC branch for that for example
9# - don't create useless bconds that for example limit SourceX: to current arch only
10#
edbbe593 11
03a3147e 12%define ver 12.01
083d2812 13%define shver %(echo %{ver} | tr -d .)
03a3147e 14%define buildid 1532
5422068c 15
40d43d2d 16Summary: World fastest web browser
048a8afa 17Summary(hu.UTF-8): A világ leggyorsabb webböngészője
0580138e 18Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
40d43d2d 19Name: opera
37147bb6 20Version: %{ver}
654f5fb1 21Release: 2
94132831 22Epoch: 2
ae712f51 23License: Distributable
40d43d2d 24Group: X11/Applications/Networking
f486f8e4 25Source10: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.i386.linux.tar.xz
03a3147e 26# Source10-md5: 892fa890e9945809dc5f6bc19b45b0d4
f486f8e4 27Source11: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.x86_64.linux.tar.xz
03a3147e 28# Source11-md5: 80dbb801d895c901e8518b488a837524
083d2812 29Source0: %{name}.desktop
35677f25 30Patch0: %{name}-wrapper.patch
25718300
AM
31Patch1: %{name}-desktop.patch
32Patch2: %{name}-pluginpath.patch
8cb331c2 33URL: http://www.opera.com/
55fc796b 34BuildRequires: rpm >= 4.4.9-56
f6dbdb8e 35BuildRequires: rpmbuild(macros) >= 1.356
6eebcb83 36BuildRequires: sed >= 4.0
f486f8e4 37BuildRequires: xz
ea04865f
AF
38Requires(post,postun): gtk-update-icon-cache
39Requires(post,postun): hicolor-icon-theme
9c325492 40Requires(post,postun): shared-mime-info
f6dbdb8e 41Requires: browser-plugins >= 2.0
c33af227 42Requires: desktop-file-utils
2f4fa75a 43Requires: freetype >= 2
9c325492
AM
44Suggests: gstreamer-theora
45Suggests: gstreamer-vorbis
3b8cc5d5 46Provides: wwwbrowser
37147bb6 47Obsoletes: opera-i18n
9c325492 48ExclusiveArch: %{ix86} %{x8664}
8cb331c2 49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
1e3271ab 50
0539d577
AM
51%define _enable_debug_packages 0
52
fa79b8f2 53%define _plugindir %{_libdir}/opera/plugins
7e80713c 54%define _operadocdir %{_docdir}/%{name}-%{ver}
083d2812
AM
55# alternative arch for plugin32
56%define alt_arch i386
8cb331c2 57
58%description
59Opera is world fastest web browser. It supports most of nowaday
55fc796b
ER
60extensions of HTML. And it is quite stable. This version is linked
61with shared version of Qt.
8cb331c2 62
048a8afa
ZU
63%description -l hu.UTF-8
64Opera a világ leggyorsabb webböngészője. A manapság elterjedt
65HTML-kiterjesztések túlnyomó többségét támogatja. És elég stabili is.
66Ez a verzió a Qt megosztott verziójához linkelődik.
67
14283174
JR
68%description -l pl.UTF-8
69Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
70dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta
083d2812 71wersja jest skonsolidowana dynamicznie z Qt.
37147bb6
AM
72
73%package plugin32
74Summary: Opera 32-bit plugins support
048a8afa 75Summary(hu.UTF-8): Opera 32-bites plugin támogatás
37147bb6
AM
76Summary(pl.UTF-8): Obsługa 32-bitowych wtyczek Opery
77Group: X11/Applications/Networking
78Requires: %{name} = %{epoch}:%{version}-%{release}
083d2812 79Requires: browser-plugins >= 2.0
37147bb6
AM
80
81%description plugin32
82Opera 32-bit plugins support.
83
048a8afa
ZU
84%description plugin32 -l hu.UTF-8
85Opera 32-bites plugin támogatás.
86
37147bb6
AM
87%description plugin32 -l pl.UTF-8
88Obsługa 32-bitowych wtyczek Opery.
58d714bb 89
8cb331c2 90%prep
643785f9 91%ifarch %{ix86}
07d1040c 92%setup -q -T -b 10 -n %{name}-%{version}-%{buildid}.i386.linux
e789f1d0 93%endif
07d1040c 94
083d2812 95%ifarch %{x8664}
07d1040c 96%setup -q -T -b 11 -n %{name}-%{version}-%{buildid}.x86_64.linux
3009d733 97%endif
07d1040c 98
25718300
AM
99sed -i -e '
100 s,@@{PREFIX},%{_prefix},g
101 s,@@{SUFFIX},,
102 s,@@{_SUFFIX},,
103' share/{applications/*.desktop,mime/packages/*.xml}
104
105sed -i -e 's,kfmclient exec,xdg-open,' share/opera/defaults/filehandler.ini
106
35677f25 107%patch0 -p1
25718300
AM
108%patch1 -p1
109
110# remove lib32/lib64 paths so patch2 can apply (i386 build contained lib64 as well, oh well)
111%{__sed} -i -e '/lib32\|lib64/d;$d' share/opera/defaults/pluginpath.ini
112%patch2 -p1
113
114mv lib/opera/plugins/README README.plugins
115mv share/opera/defaults/license.txt .
116mv share/doc/opera/* .
117
118# nobody wants scalable huge icons
119rm -rf share/icons/hicolor/scalable
120
121# opera packaging tools we don't need runtime
65c4880d 122mv share/opera/package-id.ini .
8cb331c2 123
124%install
125rm -rf $RPM_BUILD_ROOT
07d1040c 126install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir},%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
8cb331c2 127
f6dbdb8e
ER
128%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
129# opera does not use for .xpt files
130*.xpt
6ab3a1e1
ER
131
132# use mplayerplug-in-opera instead
133mplayerplug-in*
f6dbdb8e
ER
134EOF
135
07d1040c
AM
136install -p opera* $RPM_BUILD_ROOT%{_bindir}
137cp -a lib/opera $RPM_BUILD_ROOT%{_libdir}
138cp -a share/* $RPM_BUILD_ROOT%{_datadir}
25718300 139#cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir}
6239047a 140
07d1040c 141sed -i -e 's#/usr/lib/opera#%{_libdir}/opera#g' $RPM_BUILD_ROOT%{_bindir}/opera
72b0ae2b 142
0539d577
AM
143cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/operaprefs_default.ini
144[ISP]
145Id="DISTRO"
146EOF
147
201511be
AM
148%if "%{pld_release}" == "ti"
149sed -i -e 's#DISTRO#PLD/Titanium#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
150%else
151%if "%{pld_release}" == "ac"
152sed -i -e 's#DISTRO#PLD/2.0 (Ac)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
153%else
154sed -i -e 's#DISTRO#PLD/3.0 (Th)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
155%endif
156%endif
201511be 157
8cb331c2 158%clean
159rm -rf $RPM_BUILD_ROOT
160
f6dbdb8e 161%post
25718300
AM
162%update_mime_database
163%update_icon_cache hicolor
164%update_desktop_database_post
f6dbdb8e
ER
165%update_browser_plugins
166
167%postun
25718300
AM
168%update_mime_database
169%update_icon_cache hicolor
170%update_desktop_database_postun
f6dbdb8e
ER
171if [ "$1" = 0 ]; then
172 %update_browser_plugins
173fi
174
083d2812
AM
175%post plugin32
176%update_browser_plugins
177
178%postun plugin32
179if [ "$1" = 0 ]; then
180 %update_browser_plugins
181fi
182
8cb331c2 183%files
184%defattr(644,root,root,755)
c2ef0548 185%doc LICENSE
9c325492 186%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini
f6dbdb8e
ER
187
188# browser plugins v2
07d1040c
AM
189%{_browserpluginsconfdir}/browsers.d/%{name}.*
190%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
9c325492 191
07d1040c 192%attr(755,root,root) %{_bindir}/opera
65c4880d 193#%attr(755,root,root) %{_bindir}/opera-widget-manager
1e3271ab 194%dir %{_libdir}/opera
37147bb6 195%ifarch %{x8664}
654f5fb1 196%exclude %{_libdir}/opera/pluginwrapper/*-ia32-*
37147bb6 197%endif
07d1040c
AM
198%attr(755,root,root) %{_libdir}/opera/*.so
199%attr(755,root,root) %{_libdir}/opera/opera*
a8b69975 200%dir %{_libdir}/opera/pluginwrapper
50496054 201%attr(755,root,root) %{_libdir}/opera/pluginwrapper/*
1e3271ab 202%dir %{_plugindir}
07d1040c
AM
203%dir %{_libdir}/opera/gstreamer
204%dir %{_libdir}/opera/gstreamer/plugins
205%attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperamatroska.so
206%attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperavp8.so
a5b49fac 207%dir %{_datadir}/opera
9c325492 208%{_datadir}/mime/packages/opera-extension.xml
a5b49fac 209%{_datadir}/opera/*.*
628633e1
AM
210%{_datadir}/opera/defaults
211%{_datadir}/opera/extra
a5b49fac 212%{_datadir}/opera/skin
9c325492 213#%{_datadir}/opera/scripts
a5b49fac 214%{_datadir}/opera/styles
628633e1 215%{_datadir}/opera/ui
65c4880d 216#%{_datadir}/opera/unite
f8b4ca83 217%dir %{_datadir}/opera/locale
218%{_datadir}/opera/locale/en
ad7d3ceb 219%lang(af) %{_datadir}/opera/locale/af
65c4880d 220%lang(ar) %{_datadir}/opera/locale/ar
ad7d3ceb 221%lang(az) %{_datadir}/opera/locale/az
37147bb6
AM
222%lang(be) %{_datadir}/opera/locale/be
223%lang(bg) %{_datadir}/opera/locale/bg
ad7d3ceb 224%lang(bn) %{_datadir}/opera/locale/bn
37147bb6
AM
225%lang(cs) %{_datadir}/opera/locale/cs
226%lang(da) %{_datadir}/opera/locale/da
227%lang(de) %{_datadir}/opera/locale/de
228%lang(el) %{_datadir}/opera/locale/el
229%lang(en_GB) %{_datadir}/opera/locale/en-GB
07d1040c 230%lang(es_ES) %{_datadir}/opera/locale/es-ES
37147bb6 231%lang(es_LA) %{_datadir}/opera/locale/es-LA
bd7f9e14 232%lang(et) %{_datadir}/opera/locale/et
65c4880d 233%lang(fa) %{_datadir}/opera/locale/fa
37147bb6
AM
234%lang(fi) %{_datadir}/opera/locale/fi
235%lang(fr) %{_datadir}/opera/locale/fr
236%lang(fr_CA) %{_datadir}/opera/locale/fr-CA
237%lang(fy) %{_datadir}/opera/locale/fy
9c325492 238%lang(gd) %{_datadir}/opera/locale/gd
65c4880d 239%lang(he) %{_datadir}/opera/locale/he
37147bb6
AM
240%lang(hi) %{_datadir}/opera/locale/hi
241%lang(hr) %{_datadir}/opera/locale/hr
242%lang(hu) %{_datadir}/opera/locale/hu
ff88e30e 243%lang(id) %{_datadir}/opera/locale/id
37147bb6
AM
244%lang(it) %{_datadir}/opera/locale/it
245%lang(ja) %{_datadir}/opera/locale/ja
246%lang(ka) %{_datadir}/opera/locale/ka
65c4880d 247%lang(kk) %{_datadir}/opera/locale/kk
37147bb6
AM
248%lang(ko) %{_datadir}/opera/locale/ko
249%lang(lt) %{_datadir}/opera/locale/lt
ad7d3ceb 250%lang(me) %{_datadir}/opera/locale/me
37147bb6 251%lang(mk) %{_datadir}/opera/locale/mk
ad7d3ceb 252%lang(ms) %{_datadir}/opera/locale/ms
37147bb6
AM
253%lang(nb) %{_datadir}/opera/locale/nb
254%lang(nl) %{_datadir}/opera/locale/nl
255%lang(nn) %{_datadir}/opera/locale/nn
ad7d3ceb 256%lang(pa) %{_datadir}/opera/locale/pa
37147bb6
AM
257%lang(pl) %{_datadir}/opera/locale/pl
258%lang(pt) %{_datadir}/opera/locale/pt
259%lang(pt_BR) %{_datadir}/opera/locale/pt-BR
628633e1 260%lang(ro) %{_datadir}/opera/locale/ro
37147bb6 261%lang(ru) %{_datadir}/opera/locale/ru
628633e1
AM
262%lang(sk) %{_datadir}/opera/locale/sk
263%lang(sr) %{_datadir}/opera/locale/sr
37147bb6 264%lang(sv) %{_datadir}/opera/locale/sv
ad7d3ceb 265%lang(sw) %{_datadir}/opera/locale/sw
bd7f9e14
AM
266%lang(ta) %{_datadir}/opera/locale/ta
267%lang(te) %{_datadir}/opera/locale/te
ad7d3ceb
AM
268%lang(th) %{_datadir}/opera/locale/th
269%lang(tl) %{_datadir}/opera/locale/tl
37147bb6 270%lang(tr) %{_datadir}/opera/locale/tr
ff88e30e 271%lang(uk) %{_datadir}/opera/locale/uk
65c4880d 272%lang(ur) %{_datadir}/opera/locale/ur
ad7d3ceb 273%lang(uz) %{_datadir}/opera/locale/uz
66f1ccb5 274%lang(vi) %{_datadir}/opera/locale/vi
37147bb6 275%lang(zh_CN) %{_datadir}/opera/locale/zh-cn
9c325492 276#%lang(zh_HK) %{_datadir}/opera/locale/zh-hk
37147bb6 277%lang(zh_TW) %{_datadir}/opera/locale/zh-tw
ad7d3ceb 278%lang(zu) %{_datadir}/opera/locale/zu
2fd32239 279%{_datadir}/opera/region
65c4880d 280#%{_datadir}/mime/packages/opera-widget.xml
281#%{_datadir}/mime/packages/opera-unite-application.xml
7b1a5f81 282%{_desktopdir}/*.desktop
1e3271ab 283%{_mandir}/man1/opera.1*
65c4880d 284#%{_mandir}/man1/opera-widget-manager.1*
9c325492 285#%{_pixmapsdir}/opera.xpm
07d1040c 286%{_iconsdir}/hicolor/*/*/*.png
671735f8
AM
287
288%ifarch %{x8664}
289%files plugin32
290%defattr(644,root,root,755)
654f5fb1 291%attr(755,root,root) %{_libdir}/opera/pluginwrapper/*-ia32-*
671735f8 292%endif
This page took 0.184168 seconds and 4 git commands to generate.