]> git.pld-linux.org Git - packages/opera.git/blob - opera.spec
- removed install.sh hack (no longer needed)
[packages/opera.git] / opera.spec
1 # TODO:
2 # - move translations into a separate, noarch package
3 #
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)
7 %bcond_with     snap            # snap version
8 %bcond_with     weekly          # weekly snapshot version
9
10 %ifarch sparc64 sparc
11 %undefine with_shared
12 %endif
13
14 %if %{with weekly}
15 %define ver             9.10
16 %define sver            %{ver}
17 %define fix             %{nil}
18 %define dirrel          20061103
19 %define magicstr        478
20 %define with_snap       1
21 %else
22 %if %{with snap}
23 %define ver             9.0
24 %define sver            %{ver}
25 %define fix             %{nil}
26 %define dirrel          20060206
27 %define reltype         Preview-2
28 %define magicstr        %{nil}
29 %else
30 %define ver             9.02
31 %define sver            9.02
32 %define fix             %{nil}
33 %define dirrel          20060919
34 %define reltype         final
35 %define magicstr        434
36 %endif
37 %endif
38
39 %define shver           %(echo %{ver} | tr -d .)%{fix}
40 %define x86_shared_rel          %{dirrel}.5
41 %define x86_static_rel          %{dirrel}.1
42 %define sparc_shared_rel        %{dirrel}.2
43 %define sparc_static_rel        %{dirrel}.1
44 %define ppc_shared_rel          %{dirrel}.3
45 %define ppc_static_rel          %{dirrel}.1
46 %if %{with shared}
47 %define type            shared
48 # We should be able to build src.rpm also on not supported archs
49 %define rel             %{x86_shared_rel}
50 %ifarch sparc64 sparc
51 #%%define       rel             %{sparc_shared_rel}
52 %define rel             %{sparc_static_rel}
53 %endif
54 %ifarch ppc
55 %define rel             %{ppc_shared_rel}
56 %endif
57 %else
58 %define type            static
59 %define rel             %{x86_static_rel}
60 %ifarch sparc sparc64
61 %define rel             %{sparc_static_rel}
62 %endif
63 %ifarch ppc
64 %define rel             %{ppc_static_rel}
65 %endif
66 %endif
67
68 # define to 0 and then redefine to avoid
69 # not defined macros
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
76
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
83
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
91 %define need_sparc_shared_snap  0
92 %define need_ppc_shared_snap    1
93 %else
94 #                       with shared:    [else]
95 %define need_ix86_static_snap   1
96 %define need_sparc_static_snap  1
97 %define need_ppc_static_snap    1
98 %endif
99 #                       with shared;    [endif]
100 %else
101 #               with snap:      [else]
102 %if %{with shared}
103 #                       with shared?    [if]
104 %define need_ix86_shared        1
105 #%%define       need_sparc_shared       1
106 %define need_sparc_static       1
107 %define need_ppc_shared 1
108 %else
109 #                       with shared:    [else]
110 %define need_ix86_static        1
111 %define need_sparc_static       1
112 %define need_ppc_static 1
113 %endif
114 #                       with shared;    [endif]
115 %endif
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
126 %else
127 #                               with shared:    [else]
128 %define need_ix86_static_snap   1
129 %endif
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
139 %endif
140 #                               with shared;    [endif]
141 %endif
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
152 %else
153 #                               with shared:    [else]
154 %define need_sparc_static_snap  1
155 %endif
156 #                               with shared;    [endif]
157 %else
158 #                       with snap:      [else]
159 %if     %{with shared}
160 #                               with shared?    [if]
161 #%%define       need_sparc_shared       1
162 %define need_sparc_static       1
163 %else
164 #                               with shared:    [else]
165 %define need_sparc_static       1
166 %endif
167 #                               with shared;    [endif]
168 %endif
169 #                       with snap;      [endif]
170 %endif
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
179 %else
180 #                               with shared:    [else]
181 %define need_ppc_static_snap    1
182 %endif
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
192 %endif
193 #                               with shared;    [endif
194 %endif
195 #                       with snap;      [endif
196 %endif
197 #               is ppc;         [endif]
198 %endif
199 #       with incall;    [endif]
200
201 Summary:        World fastest web browser
202 Summary(pl):    Najszybsza przegl±darka WWW na ¶wiecie
203 Name:           opera
204 Version:        %{ver}%{fix}
205 Release:        %{?with_snap:1.%{rel}.}2
206 Epoch:          2
207 License:        Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
208 Group:          X11/Applications/Networking
209
210 %if %{need_ix86_static}
211 Source0:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
212 # Source0-md5:  d6c5eb5fa495fedb60b48d98daf365c3
213 %{!?with_distributable:NoSource:        0}
214 %endif
215
216 %if %{need_ix86_static_snap}
217 %if %{with weekly}
218 Source30100:    http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/en/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
219 %else
220 Source100:      http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en-%{magicstr}.tar.bz2
221 %endif
222 %{!?with_distributable:NoSource:        100}
223 %endif
224
225 %if %{need_sparc_static}
226 Source1:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
227 # Source1-md5:  6b15ff08f9f5a2f13821cf00e3ca63b2
228 %{!?with_distributable:NoSource:        1}
229 %endif
230
231 %if %{need_sparc_static_snap}
232 Source101:      http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
233 # Source101-md5:        913ccb28106f9f5acd3d94c8dc71ae1
234 %{!?with_distributable:NoSource:        101}
235 %endif
236
237 %if %{need_ppc_static}
238 Source2:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
239 # Source2-md5:  6bacc32a3ce81a2fb94c22860e772f8b
240 %{!?with_distributable:NoSource:        2}
241 %endif
242
243 %if %{need_ppc_static_snap}
244 %if %{with weekly}
245 Source30102:    http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en-%{magicstr}.tar.bz2
246 %else
247 Source102:      http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
248 %endif
249 %{!?with_distributable:NoSource:        102}
250 %endif
251
252 %if %{need_ix86_shared}
253 Source20:       ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
254 # Source20-md5: 327d0bf1f3c4eedd47b444b36c9091f6
255 %{!?with_distributable:NoSource:        20}
256 %endif
257
258 %if %{need_ix86_shared_snap}
259 %if %{with weekly}
260 Source301020:   http://snapshot.opera.com/unix/Weekly-%{magicstr}/intel-linux/en/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en-%{magicstr}.tar.bz2
261 # Source301020-md5:     e1fec5d7a0ab7445856a17ac534e45ce
262 %else
263 Source1020:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
264 # Source1020-md5:       6f296be6b9fc3001588d4509016062bd
265 %{!?with_distributable:NoSource:        1020}
266 %endif
267 %endif
268
269 %if %{need_sparc_shared}
270 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
271 # Source21-md5: 883df8058672cf52678a07d714dcfce
272 %{!?with_distributable:NoSource:        21}
273 %endif
274
275 %if %{need_sparc_shared_snap}
276 Source1021:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
277 # Source1021-md5:       e190021f5530de3f711006cd9f6bb339
278 %{!?with_distributable:NoSource:        1021}
279 %endif
280
281 %if %{need_ppc_shared}
282 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
283 # Source22-md5: 801b94f1a98f4a953fa11ea1c1b4cb33
284 %{!?with_distributable:NoSource:        22}
285 %endif
286
287 %if %{need_ppc_shared_snap}
288 %if %{with weekly}
289 Source301022:   http://snapshot.opera.com/unix/Weekly-%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en-%{magicstr}.tar.bz2
290 # Source301022-md5:     65293d788e18d0c23cccac71b9fe567c
291 %else
292 Source1022:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
293 # Source1022-md5:       74985fa6da49b2e54c9d03dab1119325
294 %{!?with_distributable:NoSource:        1022}
295 %endif
296 %endif
297
298 Source4:        %{name}.desktop
299
300 URL:            http://www.opera.com/
301 BuildRequires:  sed >= 4.0
302 Requires:       freetype >= 2
303 Provides:       wwwbrowser
304 ExclusiveArch:  %{ix86} ppc sparc sparc64
305 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
306
307 %define         _plugindir      %{_libdir}/opera/plugins
308 %define         _operadocdir    %{_docdir}/%{name}-%{ver}
309
310 %description
311 Opera is world fastest web browser. It supports most of nowaday
312 extensions of HTML. And it is quite stable. This version is %{?with_shared:shared}%{!?with_shared:statically}
313 linked with Qt.
314
315 %description -l pl
316 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
317 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Ta
318 wersja jest skonsolidowana %{?with_shared:dynamicznie}%{!?with_shared:statycznie} z Qt.
319
320 %prep
321 %ifarch %{ix86}
322 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en%{?magicstr:-%{magicstr}}
323 %endif
324 %ifarch sparc sparc64
325 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en%{?magicstr:-%{magicstr}}
326 %endif
327 %ifarch ppc
328 %setup -q -T -b %{?with_weekly:30}%{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en%{?magicstr:-%{magicstr}}
329 %endif
330
331 %install
332 rm -rf $RPM_BUILD_ROOT
333 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_sysconfdir}}
334
335 sh install.sh \
336         DESTDIR=$RPM_BUILD_ROOT \
337         --prefix=%{_prefix} \
338         --exec_prefix=%{_libdir}/opera/bin \
339         --docdir=%{_operadocdir}
340
341 # install in kde etc.
342 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
343 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
344
345 %{__sed} -i -e 's#\(.*\)OPERA_SCRIPT_PATH=.*\(\$0.*\)#\1OPERA_SCRIPT_PATH=%{_bindir}/\2#g' $RPM_BUILD_ROOT%{_bindir}/opera
346 mv -f $RPM_BUILD_ROOT%{_datadir}/%{name}/config/* $RPM_BUILD_ROOT%{_sysconfdir}
347
348 %clean
349 rm -rf $RPM_BUILD_ROOT
350
351 %files
352 %defattr(644,root,root,755)
353 %doc LICENSE
354 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/opera*rc*
355 %attr(755,root,root) %{_bindir}/*
356 %dir %{_libdir}/opera
357 %dir %{_libdir}/opera/bin
358 %attr(755,root,root) %{_libdir}/opera/bin/*
359 %dir %{_plugindir}
360 %attr(755,root,root) %{_plugindir}/*
361 %dir %{_datadir}/opera
362 %{_datadir}/opera/*.*
363 %{_datadir}/opera/images
364 %{_datadir}/opera/ini
365 %{_datadir}/opera/java
366 %{_datadir}/opera/skin
367 %{_datadir}/opera/styles
368 %dir %{_datadir}/opera/locale
369 %{_datadir}/opera/locale/en
370 %{_datadir}/opera/locale/english.lng
371 %{_desktopdir}/*.desktop
372 %{_mandir}/man1/opera.1*
373 %{_pixmapsdir}/opera.xpm
This page took 0.133561 seconds and 4 git commands to generate.