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