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