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