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