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