]> git.pld-linux.org Git - packages/opera.git/blob - opera.spec
up to 12.15
[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.15
13 %define         shver   %(echo %{ver} | tr -d .)
14 %define         buildid 1748
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:        3
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: 5a18cce4635fd2930be54649b4dabaee
27 Source11:       ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.x86_64.linux.tar.xz
28 # Source11-md5: 59e1bb087e5861126a296ef0a68df8a4
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 ln -s %{_docdir}/%{name}-%{version}/LICENSE $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults/license.txt
145 #cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir}
146
147 sed -i -e 's#/usr/lib/opera#%{_libdir}/opera#g' $RPM_BUILD_ROOT%{_bindir}/opera
148
149 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/operaprefs_default.ini
150 [ISP]
151 Id="DISTRO"
152 EOF
153
154 %if "%{pld_release}" == "ti"
155 sed -i -e 's#DISTRO#PLD/Titanium#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
156 %else
157 %if "%{pld_release}" == "ac"
158 sed -i -e 's#DISTRO#PLD/2.0 (Ac)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
159 %else
160 sed -i -e 's#DISTRO#PLD/3.0 (Th)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
161 %endif
162 %endif
163
164 %clean
165 rm -rf $RPM_BUILD_ROOT
166
167 %post
168 %update_mime_database
169 %update_icon_cache hicolor
170 %update_desktop_database_post
171 %update_browser_plugins
172
173 %postun
174 %update_mime_database
175 %update_icon_cache hicolor
176 %update_desktop_database_postun
177 if [ "$1" = 0 ]; then
178         %update_browser_plugins
179 fi
180
181 %post plugin32
182 %update_browser_plugins
183
184 %postun plugin32
185 if [ "$1" = 0 ]; then
186         %update_browser_plugins
187 fi
188
189 %files
190 %defattr(644,root,root,755)
191 %doc LICENSE
192 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini
193
194 # browser plugins v2
195 %{_browserpluginsconfdir}/browsers.d/%{name}.*
196 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
197
198 %attr(755,root,root) %{_bindir}/opera
199 #%attr(755,root,root) %{_bindir}/opera-widget-manager
200 %dir %{_libdir}/opera
201 %ifarch %{x8664}
202 %exclude %{_libdir}/opera/pluginwrapper/*-ia32-*
203 %endif
204 %attr(755,root,root) %{_libdir}/opera/*.so
205 %attr(755,root,root) %{_libdir}/opera/opera*
206 %dir %{_libdir}/opera/pluginwrapper
207 %attr(755,root,root) %{_libdir}/opera/pluginwrapper/*
208 %dir %{_plugindir}
209 %dir %{_libdir}/opera/gstreamer
210 %dir %{_libdir}/opera/gstreamer/plugins
211 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperamatroska.so
212 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperavp8.so
213 %dir %{_datadir}/opera
214 %{_datadir}/mime/packages/opera-extension.xml
215 %{_datadir}/opera/*.*
216 %{_datadir}/opera/defaults
217 %{_datadir}/opera/extra
218 %{_datadir}/opera/skin
219 #%{_datadir}/opera/scripts
220 %{_datadir}/opera/styles
221 %{_datadir}/opera/ui
222 #%{_datadir}/opera/unite
223 %dir %{_datadir}/opera/locale
224 %{_datadir}/opera/locale/en
225 %lang(af) %{_datadir}/opera/locale/af
226 %lang(ar) %{_datadir}/opera/locale/ar
227 %lang(az) %{_datadir}/opera/locale/az
228 %lang(be) %{_datadir}/opera/locale/be
229 %lang(bg) %{_datadir}/opera/locale/bg
230 %lang(bn) %{_datadir}/opera/locale/bn
231 %lang(cs) %{_datadir}/opera/locale/cs
232 %lang(da) %{_datadir}/opera/locale/da
233 %lang(de) %{_datadir}/opera/locale/de
234 %lang(el) %{_datadir}/opera/locale/el
235 %lang(en_GB) %{_datadir}/opera/locale/en-GB
236 %lang(es_ES) %{_datadir}/opera/locale/es-ES
237 %lang(es_LA) %{_datadir}/opera/locale/es-LA
238 %lang(et) %{_datadir}/opera/locale/et
239 %lang(fa) %{_datadir}/opera/locale/fa
240 %lang(fi) %{_datadir}/opera/locale/fi
241 %lang(fr) %{_datadir}/opera/locale/fr
242 %lang(fr_CA) %{_datadir}/opera/locale/fr-CA
243 %lang(fy) %{_datadir}/opera/locale/fy
244 %lang(gd) %{_datadir}/opera/locale/gd
245 %lang(he) %{_datadir}/opera/locale/he
246 %lang(hi) %{_datadir}/opera/locale/hi
247 %lang(hr) %{_datadir}/opera/locale/hr
248 %lang(hu) %{_datadir}/opera/locale/hu
249 %lang(id) %{_datadir}/opera/locale/id
250 %lang(it) %{_datadir}/opera/locale/it
251 %lang(ja) %{_datadir}/opera/locale/ja
252 %lang(ka) %{_datadir}/opera/locale/ka
253 %lang(kk) %{_datadir}/opera/locale/kk
254 %lang(ko) %{_datadir}/opera/locale/ko
255 %lang(lt) %{_datadir}/opera/locale/lt
256 %lang(lt) %{_datadir}/opera/locale/lv
257 %lang(me) %{_datadir}/opera/locale/me
258 %lang(mk) %{_datadir}/opera/locale/mk
259 %lang(ms) %{_datadir}/opera/locale/ms
260 %lang(nb) %{_datadir}/opera/locale/nb
261 %lang(nl) %{_datadir}/opera/locale/nl
262 %lang(nn) %{_datadir}/opera/locale/nn
263 %lang(pa) %{_datadir}/opera/locale/pa
264 %lang(pl) %{_datadir}/opera/locale/pl
265 %lang(pt) %{_datadir}/opera/locale/pt
266 %lang(pt_BR) %{_datadir}/opera/locale/pt-BR
267 %lang(ro) %{_datadir}/opera/locale/ro
268 %lang(ru) %{_datadir}/opera/locale/ru
269 %lang(sk) %{_datadir}/opera/locale/sk
270 %lang(sr) %{_datadir}/opera/locale/sr
271 %lang(sv) %{_datadir}/opera/locale/sv
272 %lang(sw) %{_datadir}/opera/locale/sw
273 %lang(ta) %{_datadir}/opera/locale/ta
274 %lang(te) %{_datadir}/opera/locale/te
275 %lang(th) %{_datadir}/opera/locale/th
276 %lang(tl) %{_datadir}/opera/locale/tl
277 %lang(tr) %{_datadir}/opera/locale/tr
278 %lang(uk) %{_datadir}/opera/locale/uk
279 %lang(ur) %{_datadir}/opera/locale/ur
280 %lang(uz) %{_datadir}/opera/locale/uz
281 %lang(vi) %{_datadir}/opera/locale/vi
282 %lang(zh_CN) %{_datadir}/opera/locale/zh-cn
283 #%lang(zh_HK) %{_datadir}/opera/locale/zh-hk
284 %lang(zh_TW) %{_datadir}/opera/locale/zh-tw
285 %lang(zu) %{_datadir}/opera/locale/zu
286 %{_datadir}/opera/region
287 #%{_datadir}/mime/packages/opera-widget.xml
288 #%{_datadir}/mime/packages/opera-unite-application.xml
289 %{_desktopdir}/*.desktop
290 %{_mandir}/man1/opera.1*
291 #%{_mandir}/man1/opera-widget-manager.1*
292 #%{_pixmapsdir}/opera.xpm
293 %{_iconsdir}/hicolor/*/*/*.png
294
295 %ifarch %{x8664}
296 %files plugin32
297 %defattr(644,root,root,755)
298 %attr(755,root,root) %{_libdir}/opera/pluginwrapper/*-ia32-*
299 %endif
This page took 0.057602 seconds and 4 git commands to generate.