]>
Commit | Line | Data |
---|---|---|
11dece16 | 1 | # TODO: |
da8a77bf | 2 | # - move translations into a separate, noarch package |
6239047a | 3 | # |
ec0c336f AM |
4 | %bcond_without shared # static or shared version |
5 | %bcond_without distributable # distributable or not | |
6 | %bcond_without incall # include all tarballs into src.rpm (but splitted into shared/static) | |
e56cf118 | 7 | %bcond_with snap # snap version |
7f13a385 | 8 | %bcond_with weekly # weekly snapshot version |
09f2d772 | 9 | |
1b3f992f | 10 | %ifarch sparc64 sparc |
08bc83d7 | 11 | %undefine with_shared |
1b3f992f | 12 | %endif |
13 | ||
7f13a385 | 14 | %if %{with weekly} |
37e8381c | 15 | %define ver 9.20 |
7f13a385 KK |
16 | %define sver %{ver} |
17 | %define fix %{nil} | |
37e8381c AM |
18 | %define dirrel 20070202 |
19 | %define magicstr 557 | |
7f13a385 KK |
20 | %define with_snap 1 |
21 | %else | |
e56cf118 | 22 | %if %{with snap} |
b28972ca | 23 | %define ver 9.0 |
7ad274ec | 24 | %define sver %{ver} |
6fe34fc1 | 25 | %define fix %{nil} |
3a879908 AM |
26 | %define dirrel 20060206 |
27 | %define reltype Preview-2 | |
b28972ca | 28 | %define magicstr %{nil} |
e56cf118 | 29 | %else |
9ce6f870 AM |
30 | %define ver 9.10 |
31 | %define sver 9.10 | |
94132831 | 32 | %define fix %{nil} |
9ce6f870 | 33 | %define dirrel 20061214 |
6f7271b8 | 34 | %define reltype final |
9ce6f870 | 35 | %define magicstr 521 |
e56cf118 | 36 | %endif |
7f13a385 | 37 | %endif |
e56cf118 | 38 | |
6fe34fc1 | 39 | %define shver %(echo %{ver} | tr -d .)%{fix} |
9b787f15 | 40 | %define x86_shared_rel %{dirrel}.5 |
655debcb | 41 | %define x86_static_rel %{dirrel}.1 |
42 | %define sparc_shared_rel %{dirrel}.2 | |
43 | %define sparc_static_rel %{dirrel}.1 | |
a8b8cbf5 | 44 | %define ppc_shared_rel %{dirrel}.3 |
655debcb | 45 | %define ppc_static_rel %{dirrel}.1 |
09f2d772 | 46 | %if %{with shared} |
655debcb | 47 | %define type shared |
0d0211ae | 48 | # We should be able to build src.rpm also on not supported archs |
655debcb | 49 | %define rel %{x86_shared_rel} |
7edc0e0c | 50 | %ifarch sparc64 sparc |
a034ff51 | 51 | #%%define rel %{sparc_shared_rel} |
52 | %define rel %{sparc_static_rel} | |
7edc0e0c AM |
53 | %endif |
54 | %ifarch ppc | |
655debcb | 55 | %define rel %{ppc_shared_rel} |
7edc0e0c | 56 | %endif |
09f2d772 | 57 | %else |
655debcb | 58 | %define type static |
655debcb | 59 | %define rel %{x86_static_rel} |
7edc0e0c | 60 | %ifarch sparc sparc64 |
655debcb | 61 | %define rel %{sparc_static_rel} |
7edc0e0c AM |
62 | %endif |
63 | %ifarch ppc | |
655debcb | 64 | %define rel %{ppc_static_rel} |
09f2d772 | 65 | %endif |
7edc0e0c | 66 | %endif |
2dbc1636 | 67 | |
b6dbc9f6 AM |
68 | # define to 0 and then redefine to avoid |
69 | # not defined macros | |
cbb8dbd3 | 70 | %define need_ix86_shared_snap 0 |
71 | %define need_sparc_shared_snap 0 | |
72 | %define need_ppc_shared_snap 0 | |
73 | %define need_ix86_static_snap 0 | |
74 | %define need_sparc_static_snap 0 | |
75 | %define need_ppc_static_snap 0 | |
b6dbc9f6 | 76 | |
cbb8dbd3 | 77 | %define need_ix86_shared 0 |
78 | %define need_sparc_shared 0 | |
79 | %define need_ppc_shared 0 | |
80 | %define need_ix86_static 0 | |
81 | %define need_sparc_static 0 | |
82 | %define need_ppc_static 0 | |
b6dbc9f6 | 83 | |
40d43d2d | 84 | %if %{with incall} |
85 | # with incall? [if] | |
86 | %if %{with snap} | |
87 | # with snap? [if] | |
88 | %if %{with shared} | |
89 | # with shared? [if] | |
90 | %define need_ix86_shared_snap 1 | |
b28972ca | 91 | %define need_sparc_shared_snap 0 |
40d43d2d | 92 | %define need_ppc_shared_snap 1 |
042a9712 | 93 | %else |
40d43d2d | 94 | # with shared: [else] |
95 | %define need_ix86_static_snap 1 | |
7f13a385 | 96 | %define need_sparc_static_snap 1 |
40d43d2d | 97 | %define need_ppc_static_snap 1 |
042a9712 | 98 | %endif |
40d43d2d | 99 | # with shared; [endif] |
100 | %else | |
101 | # with snap: [else] | |
102 | %if %{with shared} | |
103 | # with shared? [if] | |
104 | %define need_ix86_shared 1 | |
a034ff51 | 105 | #%%define need_sparc_shared 1 |
106 | %define need_sparc_static 1 | |
40d43d2d | 107 | %define need_ppc_shared 1 |
108 | %else | |
109 | # with shared: [else] | |
110 | %define need_ix86_static 1 | |
cbb8dbd3 | 111 | %define need_sparc_static 1 |
40d43d2d | 112 | %define need_ppc_static 1 |
2dbc1636 | 113 | %endif |
40d43d2d | 114 | # with shared; [endif] |
ec0c336f | 115 | %endif |
40d43d2d | 116 | # with snap; [endif] |
117 | %else | |
118 | # with incall: [else] | |
119 | %ifarch %{ix86} | |
120 | # is ix86? [if] | |
121 | %if %{with snap} | |
122 | # with snap? [if] | |
123 | %if %{with shared} | |
124 | # with shared? [if] | |
125 | %define need_ix86_shared_snap 1 | |
042a9712 | 126 | %else |
40d43d2d | 127 | # with shared: [else] |
128 | %define need_ix86_static_snap 1 | |
042a9712 | 129 | %endif |
40d43d2d | 130 | # with shared; [endif] |
131 | %else | |
132 | # with snap: [else] | |
133 | %if %{with shared} | |
134 | # with shared? [if] | |
135 | %define need_ix86_shared 1 | |
136 | %else | |
137 | # with shared: [else] | |
138 | %define need_ix86_static 1 | |
2dbc1636 | 139 | %endif |
40d43d2d | 140 | # with shared; [endif] |
ec0c336f | 141 | %endif |
40d43d2d | 142 | # with snap; [endif] |
143 | %endif | |
144 | # is ix86; [endif] | |
145 | %ifarch sparc sparc64 | |
146 | # is sparc? [if] | |
147 | %if %{with snap} | |
148 | # with snap? [if] | |
149 | %if %{with shared} | |
150 | # with shared? [if] | |
151 | %define need_sparc_shared_snap 1 | |
042a9712 | 152 | %else |
40d43d2d | 153 | # with shared: [else] |
154 | %define need_sparc_static_snap 1 | |
2dbc1636 | 155 | %endif |
40d43d2d | 156 | # with shared; [endif] |
2dbc1636 | 157 | %else |
40d43d2d | 158 | # with snap: [else] |
159 | %if %{with shared} | |
160 | # with shared? [if] | |
a034ff51 | 161 | #%%define need_sparc_shared 1 |
162 | %define need_sparc_static 1 | |
042a9712 | 163 | %else |
40d43d2d | 164 | # with shared: [else] |
165 | %define need_sparc_static 1 | |
042a9712 | 166 | %endif |
40d43d2d | 167 | # with shared; [endif] |
2dbc1636 | 168 | %endif |
40d43d2d | 169 | # with snap; [endif] |
ec0c336f | 170 | %endif |
40d43d2d | 171 | # is sparc; [endif] |
172 | %ifarch ppc | |
173 | # is ppc? [if] | |
174 | %if %{with snap} | |
175 | # with snap? [if] | |
176 | %if %{with shared} | |
177 | # with shared? [if] | |
178 | %define need_ppc_shared_snap 1 | |
042a9712 | 179 | %else |
40d43d2d | 180 | # with shared: [else] |
181 | %define need_ppc_static_snap 1 | |
042a9712 | 182 | %endif |
40d43d2d | 183 | # with shared; [endif] |
184 | %else | |
185 | # with snap: [else] | |
186 | %if %{with shared} | |
187 | # with shared? [if] | |
188 | %define need_ppc_shared 1 | |
189 | %else | |
190 | # with shared: [else] | |
191 | %define need_ppc_static 1 | |
2dbc1636 | 192 | %endif |
40d43d2d | 193 | # with shared; [endif |
ec0c336f | 194 | %endif |
40d43d2d | 195 | # with snap; [endif |
2dbc1636 | 196 | %endif |
40d43d2d | 197 | # is ppc; [endif] |
2dbc1636 | 198 | %endif |
40d43d2d | 199 | # with incall; [endif] |
200 | ||
054eb516 AM |
201 | %if %{with weekly} |
202 | %define need_ppc_shared_snap 0 | |
203 | %define need_ppc_static_snap 0 | |
204 | %define need_sparc_shared_snap 0 | |
205 | %define need_sparc_static_snap 0 | |
206 | %endif | |
207 | ||
f6dbdb8e | 208 | %define _rel 4 |
40d43d2d | 209 | Summary: World fastest web browser |
14283174 | 210 | Summary(pl.UTF-8): Najszybsza przeglądarka WWW na świecie |
40d43d2d | 211 | Name: opera |
8ae0cb0b | 212 | Version: %{ver}%{fix} |
35677f25 | 213 | Release: %{?with_snap:1.%{rel}.}%{_rel} |
94132831 | 214 | Epoch: 2 |
40d43d2d | 215 | License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE) |
216 | Group: X11/Applications/Networking | |
217 | ||
5949283a | 218 | %if %{need_ix86_static} |
81a3f5ef | 219 | Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2 |
9ce6f870 | 220 | # Source0-md5: dccdc5252ffc6658f3c46f32c64c8219 |
5949283a | 221 | %{!?with_distributable:NoSource: 0} |
222 | %endif | |
223 | ||
224 | %if %{need_ix86_static_snap} | |
7f13a385 | 225 | %if %{with weekly} |
e886c59d | 226 | Source30100: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2 |
7f13a385 | 227 | %else |
a06b78c5 | 228 | Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2 |
7f13a385 | 229 | %endif |
5949283a | 230 | %{!?with_distributable:NoSource: 100} |
231 | %endif | |
40d43d2d | 232 | |
5949283a | 233 | %if %{need_sparc_static} |
81a3f5ef | 234 | Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2 |
9ce6f870 | 235 | # Source1-md5: e7bcbbaa48a63827d0efc60cf6fef68d |
7187d619 | 236 | %{!?with_distributable:NoSource: 1} |
5949283a | 237 | %endif |
238 | ||
239 | %if %{need_sparc_static_snap} | |
b28972ca | 240 | Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2 |
9b787f15 | 241 | # Source101-md5: 913ccb28106f9f5acd3d94c8dc71ae1 |
5949283a | 242 | %{!?with_distributable:NoSource: 101} |
243 | %endif | |
40d43d2d | 244 | |
5949283a | 245 | %if %{need_ppc_static} |
81a3f5ef | 246 | Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2 |
9ce6f870 | 247 | # Source2-md5: d67428a09a036e786efc22e03150a344 |
5949283a | 248 | %{!?with_distributable:NoSource: 2} |
249 | %endif | |
40d43d2d | 250 | |
5949283a | 251 | %if %{need_ppc_static_snap} |
7f13a385 | 252 | %if %{with weekly} |
d6e41d46 | 253 | Source30102: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2 |
7f13a385 | 254 | %else |
b28972ca | 255 | Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2 |
7f13a385 | 256 | %endif |
5949283a | 257 | %{!?with_distributable:NoSource: 102} |
258 | %endif | |
259 | ||
260 | %if %{need_ix86_shared} | |
81a3f5ef | 261 | Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2 |
9ce6f870 | 262 | # Source20-md5: a60b0abe55ca580952b30f4540632425 |
5949283a | 263 | %{!?with_distributable:NoSource: 20} |
264 | %endif | |
265 | ||
266 | %if %{need_ix86_shared_snap} | |
7f13a385 | 267 | %if %{with weekly} |
e886c59d | 268 | Source301020: http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2 |
37e8381c | 269 | # Source301020-md5: 37e059f068f00f8f76dab00d39dad784 |
7f13a385 | 270 | %else |
b28972ca | 271 | Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2 |
3a879908 | 272 | # Source1020-md5: 6f296be6b9fc3001588d4509016062bd |
5949283a | 273 | %{!?with_distributable:NoSource: 1020} |
274 | %endif | |
9530914d | 275 | %endif |
40d43d2d | 276 | |
5949283a | 277 | %if %{need_sparc_shared} |
81a3f5ef | 278 | Source21: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/shared/gcc-2.95/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2 |
9b787f15 | 279 | # Source21-md5: 883df8058672cf52678a07d714dcfce |
5949283a | 280 | %{!?with_distributable:NoSource: 21} |
281 | %endif | |
282 | ||
aefb57ae | 283 | %if %{need_sparc_shared_snap} |
b28972ca | 284 | Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2 |
da3e18bd | 285 | # Source1021-md5: e190021f5530de3f711006cd9f6bb339 |
5949283a | 286 | %{!?with_distributable:NoSource: 1021} |
287 | %endif | |
40d43d2d | 288 | |
5949283a | 289 | %if %{need_ppc_shared} |
81a3f5ef | 290 | Source22: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/shared/gcc-2.95/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2 |
9ce6f870 | 291 | # Source22-md5: 6ef04f12a39fdbe671dfbd6a37080a81 |
5949283a | 292 | %{!?with_distributable:NoSource: 22} |
293 | %endif | |
294 | ||
295 | %if %{need_ppc_shared_snap} | |
7f13a385 | 296 | %if %{with weekly} |
d6e41d46 | 297 | Source301022: http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2 |
b387aa03 | 298 | # Source301022-md5: 65293d788e18d0c23cccac71b9fe567c |
7f13a385 | 299 | %else |
b28972ca | 300 | Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2 |
3a879908 | 301 | # Source1022-md5: 74985fa6da49b2e54c9d03dab1119325 |
5949283a | 302 | %{!?with_distributable:NoSource: 1022} |
303 | %endif | |
9530914d | 304 | %endif |
40d43d2d | 305 | |
2dbc1636 | 306 | Source4: %{name}.desktop |
35677f25 | 307 | Patch0: %{name}-wrapper.patch |
8cb331c2 | 308 | URL: http://www.opera.com/ |
f6dbdb8e | 309 | BuildRequires: rpmbuild(macros) >= 1.356 |
6eebcb83 | 310 | BuildRequires: sed >= 4.0 |
f6dbdb8e | 311 | Requires: browser-plugins >= 2.0 |
2f4fa75a | 312 | Requires: freetype >= 2 |
3b8cc5d5 | 313 | Provides: wwwbrowser |
314 | ExclusiveArch: %{ix86} ppc sparc sparc64 | |
8cb331c2 | 315 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
1e3271ab | 316 | |
fa79b8f2 | 317 | %define _plugindir %{_libdir}/opera/plugins |
7e80713c | 318 | %define _operadocdir %{_docdir}/%{name}-%{ver} |
8cb331c2 | 319 | |
320 | %description | |
321 | Opera is world fastest web browser. It supports most of nowaday | |
2bc795a6 | 322 | extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically} |
a97be43d | 323 | linked with Qt. |
8cb331c2 | 324 | |
14283174 JR |
325 | %description -l pl.UTF-8 |
326 | Opera jest najszybszą przeglądarką WWW na świecie. Obsługuje większość | |
327 | dzisiejszych rozszerzeń HTML-a. Dodatkowo jest w miarę stabilna. Ta | |
2bc795a6 | 328 | wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt. |
58d714bb | 329 | |
8cb331c2 | 330 | %prep |
643785f9 | 331 | %ifarch %{ix86} |
81a3f5ef | 332 | %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}} |
643785f9 | 333 | %endif |
5308ba56 | 334 | %ifarch sparc sparc64 |
81a3f5ef | 335 | %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en%{?magicstr:-%{magicstr}} |
643785f9 | 336 | %endif |
195ff7d0 | 337 | %ifarch ppc |
81a3f5ef | 338 | %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}} |
b966c84f | 339 | %endif |
35677f25 | 340 | %patch0 -p1 |
8cb331c2 | 341 | |
342 | %install | |
343 | rm -rf $RPM_BUILD_ROOT | |
54d2851e | 344 | install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}} |
8cb331c2 | 345 | |
f6dbdb8e ER |
346 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins -b <<'EOF' |
347 | # opera does not use for .xpt files | |
348 | *.xpt | |
6ab3a1e1 ER |
349 | |
350 | # use mplayerplug-in-opera instead | |
351 | mplayerplug-in* | |
f6dbdb8e ER |
352 | EOF |
353 | ||
51e47e74 | 354 | sh install.sh \ |
7e80713c KK |
355 | DESTDIR=$RPM_BUILD_ROOT \ |
356 | --prefix=%{_prefix} \ | |
357 | --exec_prefix=%{_libdir}/opera/bin \ | |
358 | --docdir=%{_operadocdir} | |
6239047a | 359 | |
51e47e74 | 360 | # install in kde etc. |
1e3271ab | 361 | install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir} |
7b1a5f81 | 362 | install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir} |
a8029af7 | 363 | |
54d2851e | 364 | mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir} |
72b0ae2b | 365 | |
8cb331c2 | 366 | %clean |
367 | rm -rf $RPM_BUILD_ROOT | |
368 | ||
f6dbdb8e ER |
369 | %post |
370 | %update_browser_plugins | |
371 | ||
372 | %postun | |
373 | if [ "$1" = 0 ]; then | |
374 | %update_browser_plugins | |
375 | fi | |
376 | ||
8cb331c2 | 377 | %files |
378 | %defattr(644,root,root,755) | |
c2ef0548 | 379 | %doc LICENSE |
54d2851e | 380 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc* |
f6dbdb8e ER |
381 | |
382 | # browser plugins v2 | |
383 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
384 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
385 | ||
1cfa2d1b | 386 | %attr(755,root,root) %{_bindir}/* |
1e3271ab | 387 | %dir %{_libdir}/opera |
98c525bc AM |
388 | %dir %{_libdir}/opera/bin |
389 | %attr(755,root,root) %{_libdir}/opera/bin/* | |
1e3271ab | 390 | %dir %{_plugindir} |
51e47e74 | 391 | %attr(755,root,root) %{_plugindir}/* |
a5b49fac KK |
392 | %dir %{_datadir}/opera |
393 | %{_datadir}/opera/*.* | |
394 | %{_datadir}/opera/images | |
395 | %{_datadir}/opera/ini | |
396 | %{_datadir}/opera/java | |
397 | %{_datadir}/opera/skin | |
398 | %{_datadir}/opera/styles | |
f8b4ca83 | 399 | %dir %{_datadir}/opera/locale |
400 | %{_datadir}/opera/locale/en | |
a6bb5241 | 401 | %{_datadir}/opera/locale/english.lng |
7b1a5f81 | 402 | %{_desktopdir}/*.desktop |
1e3271ab | 403 | %{_mandir}/man1/opera.1* |
7e80713c | 404 | %{_pixmapsdir}/opera.xpm |