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