]> git.pld-linux.org Git - packages/opera.git/blob - opera.spec
- rel 2; build/install from DEVEL
[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     10.60
12 %define         shver   %(echo %{ver} | tr -d .)
13 %define         buildid 6386
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:        2
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.bz2
25 # Source10-md5: e86d604b2f9397a618e8ecf357748f55
26 Source11:       ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.x86_64.linux.tar.bz2
27 # Source11-md5: 6415f21430bade3193d0d6c174e3bfb1
28 Source12:       ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{name}-%{version}-%{buildid}.ppc.linux.tar.bz2
29 # Source12-md5: 4cd09b64a0d1c3826b3e7038326c14dc
30 Source0:        %{name}.desktop
31 Patch0:         %{name}-wrapper.patch
32 Patch1:         %{name}-desktop.patch
33 Patch2:         %{name}-pluginpath.patch
34 URL:            http://www.opera.com/
35 BuildRequires:  rpm >= 4.4.9-56
36 BuildRequires:  rpmbuild(macros) >= 1.356
37 BuildRequires:  sed >= 4.0
38 Requires:       browser-plugins >= 2.0
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 %ifarch ppc
94 %setup -q -T -b 12 -n %{name}-%{version}-%{buildid}.ppc.linux
95 %endif
96
97 sed -i -e '
98         s,@@{PREFIX},%{_prefix},g
99         s,@@{SUFFIX},,
100         s,@@{_SUFFIX},,
101 ' share/{applications/*.desktop,mime/packages/*.xml}
102
103 sed -i -e 's,kfmclient exec,xdg-open,' share/opera/defaults/filehandler.ini
104
105 %patch0 -p1
106 %patch1 -p1
107
108 # remove lib32/lib64 paths so patch2 can apply (i386 build contained lib64 as well, oh well)
109 %{__sed} -i -e '/lib32\|lib64/d;$d' share/opera/defaults/pluginpath.ini
110 %patch2 -p1
111
112 mv lib/opera/plugins/README README.plugins
113 mv share/opera/defaults/license.txt .
114 mv share/doc/opera/* .
115
116 # nobody wants scalable huge icons
117 rm -rf share/icons/hicolor/scalable
118
119 # opera packaging tools we don't need runtime
120 mv share/opera/package .
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir},%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
125
126 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
127 # opera does not use for .xpt files
128 *.xpt
129
130 # use mplayerplug-in-opera instead
131 mplayerplug-in*
132 EOF
133
134 install -p opera* $RPM_BUILD_ROOT%{_bindir}
135 cp -a lib/opera $RPM_BUILD_ROOT%{_libdir}
136 cp -a share/* $RPM_BUILD_ROOT%{_datadir}
137 #cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir}
138
139 sed -i -e 's#/usr/lib/opera#%{_libdir}/opera#g' $RPM_BUILD_ROOT%{_bindir}/opera
140
141 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/operaprefs_default.ini
142 [ISP]
143 Id="DISTRO"
144 EOF
145
146 %if "%{pld_release}" == "ti"
147 sed -i -e 's#DISTRO#PLD/Titanium#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
148 %else
149 %if "%{pld_release}" == "ac"
150 sed -i -e 's#DISTRO#PLD/2.0 (Ac)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
151 %else
152 sed -i -e 's#DISTRO#PLD/3.0 (Th)#g' $RPM_BUILD_ROOT/etc/operaprefs_default.ini
153 %endif
154 %endif
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %post
160 %update_mime_database
161 %update_icon_cache hicolor
162 %update_desktop_database_post
163 %update_browser_plugins
164
165 %postun
166 %update_mime_database
167 %update_icon_cache hicolor
168 %update_desktop_database_postun
169 if [ "$1" = 0 ]; then
170         %update_browser_plugins
171 fi
172
173 %post plugin32
174 %update_browser_plugins
175
176 %postun plugin32
177 if [ "$1" = 0 ]; then
178         %update_browser_plugins
179 fi
180
181 %files
182 %defattr(644,root,root,755)
183 %doc LICENSE
184 #%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini
185
186 # browser plugins v2
187 %{_browserpluginsconfdir}/browsers.d/%{name}.*
188 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
189 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/operaprefs*.ini
190 %attr(755,root,root) %{_bindir}/opera
191 %attr(755,root,root) %{_bindir}/opera-widget-manager
192 %dir %{_libdir}/opera
193 %ifarch %{x8664}
194 %exclude %{_libdir}/opera/*-ia32-*
195 %endif
196 %attr(755,root,root) %{_libdir}/opera/*.so
197 %attr(755,root,root) %{_libdir}/opera/opera*
198 %dir %{_plugindir}
199 %dir %{_libdir}/opera/gstreamer
200 %dir %{_libdir}/opera/gstreamer/plugins
201 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperamatroska.so
202 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperavp8.so
203 %dir %{_datadir}/opera
204 %{_datadir}/opera/*.*
205 %{_datadir}/opera/defaults
206 %{_datadir}/opera/extra
207 %{_datadir}/opera/skin
208 %{_datadir}/opera/styles
209 %{_datadir}/opera/ui
210 %{_datadir}/opera/unite
211 %dir %{_datadir}/opera/locale
212 %{_datadir}/opera/locale/en
213 %lang(be) %{_datadir}/opera/locale/be
214 %lang(bg) %{_datadir}/opera/locale/bg
215 %lang(cs) %{_datadir}/opera/locale/cs
216 %lang(da) %{_datadir}/opera/locale/da
217 %lang(de) %{_datadir}/opera/locale/de
218 %lang(el) %{_datadir}/opera/locale/el
219 %lang(en_GB) %{_datadir}/opera/locale/en-GB
220 %lang(es_ES) %{_datadir}/opera/locale/es-ES
221 %lang(es_LA) %{_datadir}/opera/locale/es-LA
222 %lang(et) %{_datadir}/opera/locale/et
223 %lang(fi) %{_datadir}/opera/locale/fi
224 %lang(fr) %{_datadir}/opera/locale/fr
225 %lang(fr_CA) %{_datadir}/opera/locale/fr-CA
226 %lang(fy) %{_datadir}/opera/locale/fy
227 %lang(hi) %{_datadir}/opera/locale/hi
228 %lang(hr) %{_datadir}/opera/locale/hr
229 %lang(hu) %{_datadir}/opera/locale/hu
230 %lang(id) %{_datadir}/opera/locale/id
231 %lang(it) %{_datadir}/opera/locale/it
232 %lang(ja) %{_datadir}/opera/locale/ja
233 %lang(ka) %{_datadir}/opera/locale/ka
234 %lang(ko) %{_datadir}/opera/locale/ko
235 %lang(lt) %{_datadir}/opera/locale/lt
236 %lang(mk) %{_datadir}/opera/locale/mk
237 %lang(nb) %{_datadir}/opera/locale/nb
238 %lang(nl) %{_datadir}/opera/locale/nl
239 %lang(nn) %{_datadir}/opera/locale/nn
240 %lang(pl) %{_datadir}/opera/locale/pl
241 %lang(pt) %{_datadir}/opera/locale/pt
242 %lang(pt_BR) %{_datadir}/opera/locale/pt-BR
243 %lang(ro) %{_datadir}/opera/locale/ro
244 %lang(ru) %{_datadir}/opera/locale/ru
245 %lang(sk) %{_datadir}/opera/locale/sk
246 %lang(sr) %{_datadir}/opera/locale/sr
247 %lang(sv) %{_datadir}/opera/locale/sv
248 %lang(ta) %{_datadir}/opera/locale/ta
249 %lang(te) %{_datadir}/opera/locale/te
250 %lang(tr) %{_datadir}/opera/locale/tr
251 %lang(uk) %{_datadir}/opera/locale/uk
252 %lang(vi) %{_datadir}/opera/locale/vi
253 %lang(zh_CN) %{_datadir}/opera/locale/zh-cn
254 %lang(zh_HK) %{_datadir}/opera/locale/zh-hk
255 %lang(zh_TW) %{_datadir}/opera/locale/zh-tw
256 %{_datadir}/mime/packages/opera-widget.xml
257 %{_datadir}/mime/packages/opera-unite-application.xml
258 %{_desktopdir}/*.desktop
259 %{_mandir}/man1/opera.1*
260 %{_mandir}/man1/opera-widget-manager.1*
261 %{_iconsdir}/hicolor/*/*/*.png
262
263 %ifarch %{x8664}
264 %files plugin32
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_libdir}/opera/*-ia32-*
267 %endif
This page took 0.110831 seconds and 4 git commands to generate.