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