]>
Commit | Line | Data |
---|---|---|
a79ddb02 AM |
1 | # BRANCHES: |
2 | # - HEAD - stable version | |
3 | # - DEVEL - development version | |
5a5a63a8 | 4 | # - WEEKLY - weekly development version (sometimes it's on DEVEL) |
edbbe593 | 5 | |
5a5a63a8 AM |
6 | %bcond_without shared # static or shared version |
7 | %bcond_without distributable # distributable or not | |
8 | %bcond_with snap # snap version | |
9 | %bcond_with weekly # weekly snapshot version | |
edbbe593 | 10 | |
5a5a63a8 AM |
11 | %define ver 9.51 |
12 | %define reltype snapshot | |
13 | %define magicstr 2050 | |
14 | ||
15 | %define sver %{ver} | |
16 | %define shver %(echo %{ver} | tr -d .) | |
17 | %define sreltype %(echo %{reltype} | tr - _) | |
18 | ||
19 | # http://my.opera.com/csant/blog/2007/09/06/which-is-which | |
20 | # http://my.opera.com/csant/blog/2008/05/20/which-is-which-part-two | |
21 | %define x86_shared_rel gcc4-shared-qt3 | |
22 | %define x86_static_rel gcc4-qt4 | |
23 | %define sparc_shared_rel unknown | |
24 | %define sparc_static_rel unknown | |
25 | %define ppc_shared_rel gcc4-shared-qt3 | |
26 | %define ppc_static_rel gcc295-static-qt3 | |
27 | %define x86_64_shared_rel gcc4-shared-qt3 | |
28 | %define x86_64_static_rel unknown | |
29 | ||
30 | %if %{with shared} | |
31 | ||
32 | %define type shared | |
33 | ||
34 | # Defined to be able to build src.rpm also on not supported archs | |
35 | %define rawrel %{x86_shared_rel} | |
36 | ||
37 | %ifarch sparc sparcv9 | |
38 | %define rawrel %{sparc_shared_rel} | |
39 | %endif | |
40 | ||
41 | %ifarch ppc | |
42 | %define rawrel %{ppc_shared_rel} | |
43 | %endif | |
44 | ||
45 | %ifarch %{x8664} | |
46 | %define rawrel %{x86_64_shared_rel} | |
47 | %endif | |
48 | ||
49 | %else # [with shared] | |
50 | ||
51 | %define type static | |
52 | ||
53 | # Defined to be able to build src.rpm also on not supported archs | |
54 | %define rawrel %{x86_static_rel} | |
55 | ||
56 | %ifarch sparc sparcv9 | |
57 | %define rawrel %{sparc_static_rel} | |
58 | %endif | |
59 | ||
60 | %ifarch ppc | |
61 | %define rawrel %{ppc_static_rel} | |
62 | %endif | |
63 | ||
64 | %ifarch %{x8664} | |
65 | %define rawrel %{x86_64_static_rel} | |
66 | %endif | |
67 | ||
68 | %endif # [with shared] | |
69 | ||
70 | %define rel %(echo %{rawrel} | tr - _) | |
71 | ||
72 | %define _rel 1 | |
40d43d2d | 73 | Summary: World fastest web browser |
0580138e | 74 | Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie |
40d43d2d | 75 | Name: opera |
37147bb6 | 76 | Version: %{ver} |
5a5a63a8 | 77 | Release: 0.%{?magicstr:%{magicstr}.}%{rel}.%{_rel}.%{sreltype} |
94132831 | 78 | Epoch: 2 |
ae712f51 | 79 | License: Distributable |
40d43d2d | 80 | Group: X11/Applications/Networking |
5a5a63a8 AM |
81 | |
82 | Source0: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/intel-linux/%{name}-%{sver}-%{magicstr}.%{x86_shared_rel}.i386.tar.bz2 | |
83 | # Source0-md5: 6bd26d0d6aa28dde514ea5469ca5734e | |
84 | %{!?with_distributable:NoSource: 0} | |
85 | ||
86 | #Source1: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/sparc-linux/%{name}-%{sver}-%{magicstr}.%{sparc_shared_rel}-shared-qt.sparc.tar.bz2 | |
87 | ## Source1-md5: 913ccb28106f9f5acd3d94c8dc71ae1 | |
88 | #%{!?with_distributable:NoSource: 1} | |
89 | ||
90 | Source2: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/ppc-linux/%{name}-%{sver}-%{magicstr}.%{ppc_shared_rel}.ppc.tar.bz2 | |
91 | # Source2-md5: e105411f31fc38d92f5894b366c652ae | |
92 | %{!?with_distributable:NoSource: 2} | |
93 | ||
94 | #Source3: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/x86_64-linux/%{name}-%{sver}-%{magicstr}.%{x86_64_shared_rel}.x86_64.tar.bz2 | |
95 | # Source3-md5: a13778ebd81beab3503fb4a539140581 | |
96 | #%{!?with_distributable:NoSource: 3} | |
97 | ||
98 | Source10: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/intel-linux/%{name}-%{sver}-%{magicstr}.%{x86_static_rel}.i386.tar.bz2 | |
99 | # Source10-md5: dd13f3f1854ad1f6c8af627203241ff6 | |
100 | %{!?with_distributable:NoSource: 10} | |
101 | ||
102 | #Source11: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/sparc-linux/%{name}-%{sver}-%{magicstr}.%{sparc_static_rel}.sparc.tar.bz2 | |
103 | ## Source11-md5: e190021f5530de3f711006cd9f6bb339 | |
104 | #%{!?with_distributable:NoSource: 11} | |
105 | ||
106 | #Source12: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/ppc-linux/%{name}-%{sver}-%{magicstr}.%{ppc_static_rel}.ppc.tar.bz2 | |
107 | ## Source12-md5: 59c2f6f710c2efabeac9e153fa934743 | |
108 | #%{!?with_distributable:NoSource: 12} | |
109 | ||
110 | #Source13: http://snapshot.opera.com/unix/%{sreltype}-%{magicstr}/x86_64-linux/%{name}-%{sver}-%{magicstr}.%{x86_64_static_rel}.x86_64.tar.bz2 | |
111 | ## Source13-md5: 40b850632dbb729a0bb16a1c450d97e5 | |
112 | #%{!?with_distributable:NoSource: 13} | |
113 | ||
114 | Source4: %{name}.desktop | |
35677f25 | 115 | Patch0: %{name}-wrapper.patch |
8cb331c2 | 116 | URL: http://www.opera.com/ |
f6dbdb8e | 117 | BuildRequires: rpmbuild(macros) >= 1.356 |
6eebcb83 | 118 | BuildRequires: sed >= 4.0 |
f6dbdb8e | 119 | Requires: browser-plugins >= 2.0 |
2f4fa75a | 120 | Requires: freetype >= 2 |
3b8cc5d5 | 121 | Provides: wwwbrowser |
37147bb6 | 122 | Obsoletes: opera-i18n |
5a5a63a8 | 123 | ExclusiveArch: %{ix86} %{x8664} ppc sparc sparcv9 |
8cb331c2 | 124 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
1e3271ab | 125 | |
fa79b8f2 | 126 | %define _plugindir %{_libdir}/opera/plugins |
7e80713c | 127 | %define _operadocdir %{_docdir}/%{name}-%{ver} |
8cb331c2 | 128 | |
129 | %description | |
130 | Opera is world fastest web browser. It supports most of nowaday | |
37147bb6 | 131 | extensions of HTML. And it is quite stable. This version is |
5a5a63a8 | 132 | %{?with_shared:shared}%{!?with_shared:statically} linked with Qt. |
8cb331c2 | 133 | |
14283174 JR |
134 | %description -l pl.UTF-8 |
135 | Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość | |
136 | dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta | |
5a5a63a8 AM |
137 | wersja jest skonsolidowana |
138 | %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt. | |
37147bb6 AM |
139 | |
140 | %package plugin32 | |
141 | Summary: Opera 32-bit plugins support | |
142 | Summary(pl.UTF-8): Obsługa 32-bitowych wtyczek Opery | |
143 | Group: X11/Applications/Networking | |
144 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
145 | ||
146 | %description plugin32 | |
147 | Opera 32-bit plugins support. | |
148 | ||
149 | %description plugin32 -l pl.UTF-8 | |
150 | Obsługa 32-bitowych wtyczek Opery. | |
58d714bb | 151 | |
8cb331c2 | 152 | %prep |
643785f9 | 153 | %ifarch %{ix86} |
5a5a63a8 | 154 | %setup -q -T -b %{!?with_shared:1}0 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.i386 |
2d8d939d | 155 | %endif |
5a5a63a8 AM |
156 | |
157 | %ifarch sparc sparcv9 | |
158 | %setup -q -T -b %{!?with_shared:1}1 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.sparc | |
643785f9 | 159 | %endif |
5a5a63a8 | 160 | |
195ff7d0 | 161 | %ifarch ppc |
5a5a63a8 | 162 | %setup -q -T -b %{!?with_shared:1}2 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.ppc |
b966c84f | 163 | %endif |
5a5a63a8 AM |
164 | |
165 | %ifarch %{x8664} | |
166 | %setup -q -T -b %{!?with_shared:1}3 -n %{name}-%{sver}-%{?magicstr:%{magicstr}.}%{rawrel}.x86_64 | |
167 | %endif | |
168 | ||
35677f25 | 169 | %patch0 -p1 |
8cb331c2 | 170 | |
171 | %install | |
172 | rm -rf $RPM_BUILD_ROOT | |
54d2851e | 173 | install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}} |
8cb331c2 | 174 | |
f6dbdb8e ER |
175 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF' |
176 | # opera does not use for .xpt files | |
177 | *.xpt | |
6ab3a1e1 ER |
178 | |
179 | # use mplayerplug-in-opera instead | |
180 | mplayerplug-in* | |
929e48ab ER |
181 | |
182 | # opera uses libjava.so to run java | |
183 | libjavaplugin_oji.so | |
f6dbdb8e ER |
184 | EOF |
185 | ||
51e47e74 | 186 | sh install.sh \ |
7e80713c KK |
187 | DESTDIR=$RPM_BUILD_ROOT \ |
188 | --prefix=%{_prefix} \ | |
2d8d939d ER |
189 | --exec_prefix=%{_libdir}/%{name}/bin \ |
190 | --plugindir=%{_libdir}/%{name}/plugins \ | |
7e80713c | 191 | --docdir=%{_operadocdir} |
6239047a | 192 | |
51e47e74 | 193 | # install in kde etc. |
5a5a63a8 | 194 | install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir} |
a8029af7 | 195 | |
37147bb6 AM |
196 | install etc/* $RPM_BUILD_ROOT%{_sysconfdir} |
197 | install usr/share/pixmaps/*.xpm $RPM_BUILD_ROOT%{_pixmapsdir} | |
72b0ae2b | 198 | |
8cb331c2 | 199 | %clean |
200 | rm -rf $RPM_BUILD_ROOT | |
201 | ||
f6dbdb8e ER |
202 | %post |
203 | %update_browser_plugins | |
204 | ||
205 | %postun | |
206 | if [ "$1" = 0 ]; then | |
207 | %update_browser_plugins | |
208 | fi | |
209 | ||
8cb331c2 | 210 | %files |
211 | %defattr(644,root,root,755) | |
c2ef0548 | 212 | %doc LICENSE |
54d2851e | 213 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc* |
f6dbdb8e ER |
214 | |
215 | # browser plugins v2 | |
5a5a63a8 AM |
216 | %{_browserpluginsconfdir}/browsers.d/%{name}.* |
217 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
f6dbdb8e | 218 | |
1cfa2d1b | 219 | %attr(755,root,root) %{_bindir}/* |
1e3271ab | 220 | %dir %{_libdir}/opera |
98c525bc AM |
221 | %dir %{_libdir}/opera/bin |
222 | %attr(755,root,root) %{_libdir}/opera/bin/* | |
37147bb6 AM |
223 | %ifarch %{x8664} |
224 | %exclude %{_libdir}/opera/bin/*-ia32-* | |
225 | %endif | |
1e3271ab | 226 | %dir %{_plugindir} |
a5b49fac KK |
227 | %dir %{_datadir}/opera |
228 | %{_datadir}/opera/*.* | |
a5b49fac KK |
229 | %{_datadir}/opera/ini |
230 | %{_datadir}/opera/java | |
231 | %{_datadir}/opera/skin | |
232 | %{_datadir}/opera/styles | |
f8b4ca83 | 233 | %dir %{_datadir}/opera/locale |
234 | %{_datadir}/opera/locale/en | |
a6bb5241 | 235 | %{_datadir}/opera/locale/english.lng |
37147bb6 AM |
236 | %lang(be) %{_datadir}/opera/locale/be |
237 | %lang(bg) %{_datadir}/opera/locale/bg | |
238 | %lang(cs) %{_datadir}/opera/locale/cs | |
239 | %lang(da) %{_datadir}/opera/locale/da | |
240 | %lang(de) %{_datadir}/opera/locale/de | |
241 | %lang(el) %{_datadir}/opera/locale/el | |
242 | %lang(en_GB) %{_datadir}/opera/locale/en-GB | |
5a5a63a8 | 243 | %lang(es_ES) %{_datadir}/opera/locale/es-ES |
37147bb6 AM |
244 | %lang(es_LA) %{_datadir}/opera/locale/es-LA |
245 | %lang(fi) %{_datadir}/opera/locale/fi | |
246 | %lang(fr) %{_datadir}/opera/locale/fr | |
247 | %lang(fr_CA) %{_datadir}/opera/locale/fr-CA | |
248 | %lang(fy) %{_datadir}/opera/locale/fy | |
249 | %lang(hi) %{_datadir}/opera/locale/hi | |
250 | %lang(hr) %{_datadir}/opera/locale/hr | |
251 | %lang(hu) %{_datadir}/opera/locale/hu | |
252 | %lang(it) %{_datadir}/opera/locale/it | |
253 | %lang(ja) %{_datadir}/opera/locale/ja | |
254 | %lang(ka) %{_datadir}/opera/locale/ka | |
255 | %lang(ko) %{_datadir}/opera/locale/ko | |
256 | %lang(lt) %{_datadir}/opera/locale/lt | |
257 | %lang(mk) %{_datadir}/opera/locale/mk | |
258 | %lang(nb) %{_datadir}/opera/locale/nb | |
259 | %lang(nl) %{_datadir}/opera/locale/nl | |
260 | %lang(nn) %{_datadir}/opera/locale/nn | |
261 | %lang(pl) %{_datadir}/opera/locale/pl | |
262 | %lang(pt) %{_datadir}/opera/locale/pt | |
263 | %lang(pt_BR) %{_datadir}/opera/locale/pt-BR | |
264 | %lang(ru) %{_datadir}/opera/locale/ru | |
265 | %lang(sv) %{_datadir}/opera/locale/sv | |
266 | %lang(tr) %{_datadir}/opera/locale/tr | |
267 | %lang(zh_CN) %{_datadir}/opera/locale/zh-cn | |
268 | %lang(zh_TW) %{_datadir}/opera/locale/zh-tw | |
7b1a5f81 | 269 | %{_desktopdir}/*.desktop |
1e3271ab | 270 | %{_mandir}/man1/opera.1* |
7e80713c | 271 | %{_pixmapsdir}/opera.xpm |
671735f8 AM |
272 | |
273 | %ifarch %{x8664} | |
274 | %files plugin32 | |
275 | %defattr(644,root,root,755) | |
5a5a63a8 | 276 | %attr(755,root,root) %{_libdir}/opera/bin/*-ia32-* |
671735f8 | 277 | %endif |