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