2 # - HEAD - stable version
3 # - DEVEL - development version
4 # - WEEKLY - weekly development version (sometimes it's on DEVEL)
5 %bcond_without distributable # distributable or not
8 %define subverdir poland_10.70-6425
10 Summary: World fastest web browser
11 Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie
14 Release: 0.%{subver}.%{rel}
16 License: Distributable
17 Group: X11/Applications/Networking
18 Source0: http://snapshot.opera.com/unix/%{subverdir}/%{name}-%{version}-%{subver}.i386.linux.tar.bz2
19 # Source0-md5: a81affd275c407501c5ca6ad2159cadb
20 %{!?with_distributable:NoSource: 0}
21 Source1: http://snapshot.opera.com/unix/%{subverdir}/%{name}-%{version}-%{subver}.x86_64.linux.tar.bz2
22 # Source1-md5: 00a5b951ff042dc68e7639c23fa9303e
23 %{!?with_distributable:NoSource: 1}
24 Patch0: %{name}-wrapper.patch
25 Patch1: %{name}-desktop.patch
26 Patch2: %{name}-pluginpath.patch
27 URL: http://www.opera.com/
28 BuildRequires: rpmbuild(macros) >= 1.356
29 BuildRequires: sed >= 4.0
30 Requires(post,postun): desktop-file-utils
31 Requires(post,postun): gtk+2
32 Requires(post,postun): hicolor-icon-theme
33 Requires(post,postun): shared-mime-info
34 Requires: browser-plugins >= 2.0
35 Requires: freetype >= 2
36 Suggests: gstreamer-theora
37 Suggests: gstreamer-vorbis
40 ExclusiveArch: %{ix86} %{x8664}
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define _enable_debug_packages 0
45 %define _plugindir %{_libdir}/opera/plugins
46 %define _operadocdir %{_docdir}/%{name}-%{version}
49 Opera is world fastest web browser. It supports most of nowaday
50 extensions of HTML. And it is quite stable.
52 %description -l pl.UTF-8
53 Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość
54 dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna.
57 Summary: Opera 32-bit plugins support
58 Summary(pl.UTF-8): Obsługa 32-bitowych wtyczek Opery
59 Group: X11/Applications/Networking
60 Requires: %{name} = %{epoch}:%{version}-%{release}
63 Opera 32-bit plugins support.
65 %description plugin32 -l pl.UTF-8
66 Obsługa 32-bitowych wtyczek Opery.
70 %setup -q -T -b0 -n %{name}-%{version}-%{subver}.i386.linux
73 %setup -q -T -b1 -n %{name}-%{version}-%{subver}.x86_64.linux
77 s,@@{PREFIX},%{_prefix},g
80 ' share/{applications/*.desktop,mime/packages/*.xml}
82 sed -i -e 's,kfmclient exec,xdg-open,' share/opera/defaults/filehandler.ini
87 # remove lib32/lib64 paths so patch2 can apply (i386 build contained lib64 as well, oh well)
88 %{__sed} -i -e '/lib32\|lib64/d;$d' share/opera/defaults/pluginpath.ini
91 mv lib/opera/plugins/README README.plugins
92 mv share/opera/defaults/license.txt .
93 mv share/doc/opera/* .
95 # nobody wants scalable huge icons
96 rm -rf share/icons/hicolor/scalable
98 # opera packaging tools we don't need runtime
99 mv share/opera/package .
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_datadir},%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
105 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF'
106 # opera does not use for .xpt files
109 # use mplayerplug-in-opera instead
113 install -p opera* $RPM_BUILD_ROOT%{_bindir}
114 cp -a lib/opera $RPM_BUILD_ROOT%{_libdir}
115 cp -a share/* $RPM_BUILD_ROOT%{_datadir}
116 #cp -a etc/*.ini $RPM_BUILD_ROOT%{_sysconfdir}
118 sed -i -e 's#/usr/lib/opera#%{_libdir}/opera#g' $RPM_BUILD_ROOT%{_bindir}/opera
121 rm -rf $RPM_BUILD_ROOT
124 %update_mime_database
125 %update_icon_cache hicolor
126 %update_desktop_database_post
127 %update_browser_plugins
130 %update_mime_database
131 %update_icon_cache hicolor
132 %update_desktop_database_postun
133 if [ "$1" = 0 ]; then
134 %update_browser_plugins
138 %defattr(644,root,root,755)
140 #%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*ini
143 %{_browserpluginsconfdir}/browsers.d/%{name}.*
144 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
146 %attr(755,root,root) %{_bindir}/opera
147 %attr(755,root,root) %{_bindir}/opera-widget-manager
148 %dir %{_libdir}/opera
150 %exclude %{_libdir}/opera/*-ia32-*
152 %attr(755,root,root) %{_libdir}/opera/*.so
153 %attr(755,root,root) %{_libdir}/opera/opera*
155 %dir %{_libdir}/opera/gstreamer
156 %dir %{_libdir}/opera/gstreamer/plugins
157 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperamatroska.so
158 %attr(755,root,root) %{_libdir}/opera/gstreamer/plugins/libgstoperavp8.so
159 %dir %{_datadir}/opera
160 %{_datadir}/opera/*.*
161 %{_datadir}/opera/defaults
162 %{_datadir}/opera/extra
163 %{_datadir}/opera/skin
164 #%{_datadir}/opera/scripts
165 %{_datadir}/opera/styles
167 %{_datadir}/opera/unite
168 %dir %{_datadir}/opera/locale
169 %{_datadir}/opera/locale/en
170 %lang(be) %{_datadir}/opera/locale/be
171 %lang(bg) %{_datadir}/opera/locale/bg
172 %lang(cs) %{_datadir}/opera/locale/cs
173 %lang(da) %{_datadir}/opera/locale/da
174 %lang(de) %{_datadir}/opera/locale/de
175 %lang(el) %{_datadir}/opera/locale/el
176 %lang(en_GB) %{_datadir}/opera/locale/en-GB
177 %lang(es_ES) %{_datadir}/opera/locale/es-ES
178 %lang(es_LA) %{_datadir}/opera/locale/es-LA
179 %lang(et) %{_datadir}/opera/locale/et
180 %lang(fi) %{_datadir}/opera/locale/fi
181 %lang(fr) %{_datadir}/opera/locale/fr
182 %lang(fr_CA) %{_datadir}/opera/locale/fr-CA
183 %lang(fy) %{_datadir}/opera/locale/fy
184 %lang(hi) %{_datadir}/opera/locale/hi
185 %lang(hr) %{_datadir}/opera/locale/hr
186 %lang(hu) %{_datadir}/opera/locale/hu
187 %lang(id) %{_datadir}/opera/locale/id
188 %lang(it) %{_datadir}/opera/locale/it
189 %lang(ja) %{_datadir}/opera/locale/ja
190 %lang(ka) %{_datadir}/opera/locale/ka
191 %lang(ko) %{_datadir}/opera/locale/ko
192 %lang(lt) %{_datadir}/opera/locale/lt
193 %lang(mk) %{_datadir}/opera/locale/mk
194 %lang(nb) %{_datadir}/opera/locale/nb
195 %lang(nl) %{_datadir}/opera/locale/nl
196 %lang(nn) %{_datadir}/opera/locale/nn
197 %lang(pl) %{_datadir}/opera/locale/pl
198 %lang(pt) %{_datadir}/opera/locale/pt
199 %lang(pt_BR) %{_datadir}/opera/locale/pt-BR
200 %lang(ro) %{_datadir}/opera/locale/ro
201 %lang(ru) %{_datadir}/opera/locale/ru
202 %lang(sk) %{_datadir}/opera/locale/sk
203 %lang(sr) %{_datadir}/opera/locale/sr
204 %lang(sv) %{_datadir}/opera/locale/sv
205 %lang(ta) %{_datadir}/opera/locale/ta
206 %lang(te) %{_datadir}/opera/locale/te
207 %lang(tr) %{_datadir}/opera/locale/tr
208 %lang(uk) %{_datadir}/opera/locale/uk
209 %lang(vi) %{_datadir}/opera/locale/vi
210 %lang(zh_CN) %{_datadir}/opera/locale/zh-cn
211 %lang(zh_HK) %{_datadir}/opera/locale/zh-hk
212 %lang(zh_TW) %{_datadir}/opera/locale/zh-tw
213 %{_datadir}/mime/packages/opera-widget.xml
214 %{_datadir}/mime/packages/opera-unite-application.xml
215 %{_desktopdir}/*.desktop
216 %{_mandir}/man1/opera.1*
217 %{_mandir}/man1/opera-widget-manager.1*
218 #%{_pixmapsdir}/opera.xpm
219 %{_iconsdir}/hicolor/*/*/*.png
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_libdir}/opera/*-ia32-*