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