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