]> git.pld-linux.org Git - packages/opera.git/blob - opera.spec
- snap version 8.10; 8.02 still not available (stupid opera team announced version...
[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
9 %ifarch sparc64 sparc
10 %undefine with_shared
11 %endif
12
13 %if %{with snap}
14 %define ver             8.10
15 %define sver            %{ver}
16 %define fix             %{nil}
17 %define dirrel          20050728
18 %define reltype         Preview-2
19 %define magicstr        1275-20050728-P2BT
20 %else
21 %define ver             8.02
22 %define sver            8.02
23 %define fix             %{nil}
24 %define dirrel          20050615
25 %define reltype         final
26 %endif
27
28 %define shver           %(echo %{ver} | tr -d .)%{fix}
29 %define x86_shared_rel          %{dirrel}.5
30 %define x86_static_rel          %{dirrel}.1
31 %define sparc_shared_rel        %{dirrel}.2
32 %define sparc_static_rel        %{dirrel}.1
33 %define ppc_shared_rel          %{dirrel}.3
34 %define ppc_static_rel          %{dirrel}.1
35 %if %{with shared}
36 %define type            shared
37 # We should be able to build src.rpm also on not supported archs
38 %define rel             %{x86_shared_rel}
39 %ifarch sparc64 sparc
40 #%%define       rel             %{sparc_shared_rel}
41 %define rel             %{sparc_static_rel}
42 %endif
43 %ifarch ppc
44 %define rel             %{ppc_shared_rel}
45 %endif
46 %else
47 %define type            static
48 %define rel             %{x86_static_rel}
49 %ifarch sparc sparc64
50 %define rel             %{sparc_static_rel}
51 %endif
52 %ifarch ppc
53 %define rel             %{ppc_static_rel}
54 %endif
55 %endif
56
57 # define to 0 and then redefine to avoid
58 # not defined macros
59 %define need_ix86_shared_snap   0
60 %define need_sparc_shared_snap  0
61 %define need_ppc_shared_snap    0
62 %define need_ix86_static_snap   0
63 %define need_sparc_static_snap  0
64 %define need_ppc_static_snap    0
65
66 %define need_ix86_shared        0
67 %define need_sparc_shared       0
68 %define need_ppc_shared         0
69 %define need_ix86_static        0
70 %define need_sparc_static       0
71 %define need_ppc_static         0
72
73 %if %{with incall}
74 #       with incall?    [if]
75 %if     %{with snap}
76 #               with snap?      [if]
77 %if     %{with shared}
78 #                       with shared?    [if]
79 %define need_ix86_shared_snap   1
80 %define need_sparc_shared_snap  1
81 %define need_ppc_shared_snap    1
82 %else
83 #                       with shared:    [else]
84 %define need_ix86_static_snap   1
85 %define need_sparc_static_snap  1
86 %define need_ppc_static_snap    1
87 %endif
88 #                       with shared;    [endif]
89 %else
90 #               with snap:      [else]
91 %if %{with shared}
92 #                       with shared?    [if]
93 %define need_ix86_shared        1
94 #%%define       need_sparc_shared       1
95 %define need_sparc_static       1
96 %define need_ppc_shared 1
97 %else
98 #                       with shared:    [else]
99 %define need_ix86_static        1
100 %define need_sparc_static       1
101 %define need_ppc_static 1
102 %endif
103 #                       with shared;    [endif]
104 %endif
105 #               with snap;      [endif]
106 %else
107 #       with incall:    [else]
108 %ifarch %{ix86}
109 #               is ix86?        [if]
110 %if     %{with snap}
111 #                       with snap?      [if]
112 %if     %{with shared}
113 #                               with shared?    [if]
114 %define need_ix86_shared_snap   1
115 %else
116 #                               with shared:    [else]
117 %define need_ix86_static_snap   1
118 %endif
119 #                               with shared;    [endif]
120 %else
121 #                       with snap:      [else]
122 %if     %{with shared}
123 #                               with shared?    [if]
124 %define need_ix86_shared        1
125 %else
126 #                               with shared:    [else]
127 %define need_ix86_static        1
128 %endif
129 #                               with shared;    [endif]
130 %endif
131 #                       with snap;      [endif]
132 %endif
133 #               is ix86;        [endif]
134 %ifarch sparc sparc64
135 #               is sparc?       [if]
136 %if     %{with snap}
137 #                       with snap?      [if]
138 %if     %{with shared}
139 #                               with shared?    [if]
140 %define need_sparc_shared_snap  1
141 %else
142 #                               with shared:    [else]
143 %define need_sparc_static_snap  1
144 %endif
145 #                               with shared;    [endif]
146 %else
147 #                       with snap:      [else]
148 %if     %{with shared}
149 #                               with shared?    [if]
150 #%%define       need_sparc_shared       1
151 %define need_sparc_static       1
152 %else
153 #                               with shared:    [else]
154 %define need_sparc_static       1
155 %endif
156 #                               with shared;    [endif]
157 %endif
158 #                       with snap;      [endif]
159 %endif
160 #               is sparc;       [endif]
161 %ifarch ppc
162 #               is ppc?         [if]
163 %if     %{with snap}
164 #                       with snap?      [if]
165 %if     %{with shared}
166 #                               with shared?    [if]
167 %define need_ppc_shared_snap    1
168 %else
169 #                               with shared:    [else]
170 %define need_ppc_static_snap    1
171 %endif
172 #                               with shared;    [endif]
173 %else
174 #                       with snap:      [else]
175 %if     %{with shared}
176 #                               with shared?    [if]
177 %define need_ppc_shared 1
178 %else
179 #                               with shared:    [else]
180 %define need_ppc_static 1
181 %endif
182 #                               with shared;    [endif
183 %endif
184 #                       with snap;      [endif
185 %endif
186 #               is ppc;         [endif]
187 %endif
188 #       with incall;    [endif]
189
190 Summary:        World fastest web browser
191 Summary(pl):    Najszybsza przegl±darka WWW na ¶wiecie
192 Name:           opera
193 Version:        %{ver}%{fix}
194 Release:        %{?with_snap:0.%{rel}.}0.1
195 Epoch:          2
196 License:        Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
197 Group:          X11/Applications/Networking
198
199 %if %{need_ix86_static}
200 Source0:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
201 # Source0-md5:  ea52b2cff58fb02a9c7c3dffa93c08e7
202 %{!?with_distributable:NoSource:        0}
203 %endif
204
205 %if %{need_ix86_static_snap}
206 Source100:      http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/en/%{name}-%{sver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
207 %{!?with_distributable:NoSource:        100}
208 %endif
209
210 %if %{need_sparc_static}
211 Source1:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
212 # Source1-md5:  59909c2edfc7da7cbc52f1047975d485
213 %{!?with_distributable:NoSource:        1}
214 %endif
215
216 %if %{need_sparc_static_snap}
217 Source101:      http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/en/%{name}-%{sver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
218 # Source101-md5:        913ccb28106f9f5acd3d94c8dc71ae1
219 %{!?with_distributable:NoSource:        101}
220 %endif
221
222 %if %{need_ppc_static}
223 Source2:        ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
224 # Source2-md5:  9a04e99b99455dc3939adfb9502ce3f2
225 %{!?with_distributable:NoSource:        2}
226 %endif
227
228 %if %{need_ppc_static_snap}
229 Source102:      http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/en/%{name}-%{sver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
230 %{!?with_distributable:NoSource:        102}
231 %endif
232
233 %if %{need_ix86_shared}
234 Source20:       ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
235 # Source20-md5: cf2a3502687bdc57c06eca7b1fe1cc43
236 %{!?with_distributable:NoSource:        20}
237 %endif
238
239 %if %{need_ix86_shared_snap}
240 Source1020:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/intel-linux/en/%{name}-%{sver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
241 # Source1020-md5:       d11026f15f8c3680a772e3278804accb
242 %{!?with_distributable:NoSource:        1020}
243 %endif
244
245 %if %{need_sparc_shared}
246 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
247 # Source21-md5: 883df8058672cf52678a07d714dcfce
248 %{!?with_distributable:NoSource:        21}
249 %endif
250
251 %if %{need_sparc_shared_snap}
252 Source1021:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/sparc-linux/en/%{name}-%{sver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
253 # Source1021-md5:       e190021f5530de3f711006cd9f6bb339
254 %{!?with_distributable:NoSource:        1021}
255 %endif
256
257 %if %{need_ppc_shared}
258 Source22:       opera-8.02-20050705.3-shared-qt.ppc-en.tar.bz2
259 # Source22-md5: 12a30aa4983e6f9180c3f1a039118a4e
260 %{!?with_distributable:NoSource:        22}
261 %endif
262
263 %if %{need_ppc_shared_snap}
264 Source1022:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/%{magicstr}/ppc-linux/en/%{name}-%{sver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
265 # Source1022-md5:       daa712e362abe9d3dac74fad150d612c
266 %{!?with_distributable:NoSource:        1022}
267 %endif
268
269 Source4:        %{name}.desktop
270
271 URL:            http://www.opera.com/
272 ExclusiveArch:  %{ix86} ppc sparc sparc64
273 Requires:       freetype >= 2
274 Requires:       openmotif >= 2
275 BuildRequires:  sed >= 4.0
276 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
277
278 %define         _plugindir      %{_libdir}/opera/plugins
279 %define         _operadocdir    %{_docdir}/%{name}-%{ver}.%{rel}
280 %define         configfile      %{_datadir}/opera/config/opera6rc
281
282 %description
283 Opera is world fastest web browser. It supports most of nowaday
284 extensions of HTML. And it is quite stable. Only disadvantage are
285 advertisements on the top of its window. Version static linked with
286 qt.
287
288 %description -l pl
289 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
290 dzisiejszych rozszerzeñ HTML-a. Dodatkowo jest w miarê stabilna. Jedyn±
291 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
292 statycznie skonsolidowana z qt.
293
294 %prep
295 %ifarch %{ix86}
296 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{sver}-%{rel}-%{type}-qt.i386-en
297 %endif
298 %ifarch sparc sparc64
299 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{sver}-%{rel}-%{type}-qt.sparc-en
300 %endif
301 %ifarch ppc
302 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{sver}-%{rel}-%{type}-qt.ppc-en
303 %endif
304
305 %install
306 rm -rf $RPM_BUILD_ROOT
307
308 install -d $RPM_BUILD_ROOT{/etc,%{_libdir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
309 ln -s $RPM_BUILD_ROOT/etc  $RPM_BUILD_ROOT%{_prefix}/etc
310
311 sed -i -e 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' install.sh
312
313 echo y |\
314 sh install.sh \
315         --prefix=$RPM_BUILD_ROOT%{_prefix} \
316         --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
317         --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
318         --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
319         --exec_prefix=$RPM_BUILD_ROOT%{_libdir}/opera/bin \
320         --plugindir=$RPM_BUILD_ROOT%{_plugindir}
321
322 # man install
323 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
324
325 # wrapper correction
326 sed -i -e "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{_bindir}/opera
327
328 # install in kde etc.
329 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
330
331 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
332
333 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
334
335 # always use latest possible wrapper
336 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
337 if [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3" ]; then
338         ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
339         ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
340 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2" ]; then
341         ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
342         ln -sf operamotifwrapper-2 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
343 elif [ -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1" ]; then
344         ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
345         ln -sf operamotifwrapper-1 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-3
346 fi
347
348 # clean unneeded files
349 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/config
350
351 %clean
352 rm -rf $RPM_BUILD_ROOT
353
354 %files
355 %defattr(644,root,root,755)
356 %doc LICENSE bugreport
357 %attr(755,root,root) %{_bindir}/*
358 %dir %{_libdir}/opera
359 %dir %{_libdir}/opera/bin
360 %attr(755,root,root) %{_libdir}/opera/bin/*
361 %dir %{_plugindir}
362 %attr(755,root,root) %{_plugindir}/*
363 %dir %{_datadir}/opera
364 %{_datadir}/opera/*.*
365 %{_datadir}/opera/images
366 %{_datadir}/opera/ini
367 %{_datadir}/opera/java
368 %{_datadir}/opera/skin
369 %{_datadir}/opera/styles
370 %dir %{_datadir}/opera/locale
371 %{_datadir}/opera/locale/en
372 %{_datadir}/opera/locale/english.lng
373 %{_pixmapsdir}/opera.xpm
374 %{_desktopdir}/*.desktop
375
376 %{_mandir}/man1/opera.1*
377
378 %config(noreplace) %verify(not md5 size mtime) /etc/opera*rc*
This page took 0.34925 seconds and 3 git commands to generate.