]> git.pld-linux.org Git - packages/opera.git/blob - opera.spec
- removed (IMO) pathology with "if"s
[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 %{?need_ix86_static:Source0:    ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{ver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2}
172 # Source0-md5:  0a7e933ef593d4b7a897041c9f87bba2
173 %{?need_ix86_static_snap:Source100:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{ver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2}
174
175 %{?need_sparc_static:Source1:   ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{ver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2}
176 # Source1-md5:  04976a6ace7a4345ce5e4cf763159939
177 #%{?need_sparc_static_snap:Source101:   http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{ver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2}
178
179 %{?need_ppc_static:Source2:     ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{ver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2}
180 # Source2-md5:  c11a4c78d18bdaa4bd338b4c0dc27f38
181 %{?need_ppc_static_snap:Source102:      http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{ver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2}
182
183 %{?need_ix86_shared:Source20:   ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{ver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2}
184 # Source20-md5: 0e407a050f3aa4559011a3cea707cd20
185 %{?need_ix86_shared_snap:Source1020:    http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{ver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2}
186 # Source1020-md5:       da4df3c5d65057eac4e063b4359fafa6
187
188 %{?need_sparc_shared: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}
189 # Source21-md5: d8635013dac0c98c680997fcc9dd66c4
190 #%{?need_ix86_shared_snap:Source1021:   http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{ver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2}
191
192 %{?need_ppc_shared: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}
193 # Source22-md5: 516992e68c5a710d795a1ecc791c7f4d
194 %{?need_ppc_shared_snap:Source1022:     http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{ver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2}
195 # Source1022-md5:      6496d9871a2ca7337377ed3ecc298559
196
197 Source4:        %{name}.desktop
198 %if ! %{with distributable}
199 NoSource:       0
200 NoSource:       1
201 NoSource:       2
202 NoSource:       20
203 NoSource:       21
204 NoSource:       22
205 NoSource:       100
206 NoSource:       101
207 NoSource:       102
208 NoSource:       1020
209 NoSource:       1021
210 NoSource:       1022
211 %endif
212
213 URL:            http://www.opera.com/
214 ExclusiveArch:  %{ix86} ppc sparc sparc64
215 Requires:       freetype >= 2
216 Requires:       openmotif >= 2
217 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
218
219 %define         _plugindir      %{_libdir}/opera/plugins
220 %define         _operadocdir    %{_docdir}/%{name}-%{ver}.%{rel}
221 %define         configfile      %{_datadir}/opera/config/opera6rc
222
223 %description
224 Opera is world fastest web browser. It supports most of nowaday
225 extensions of HTML. And it is quite stable. Only disadvantage are
226 advertisements on the top of its window. Version static linked with
227 qt.
228
229 %description -l pl
230 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
231 dzisiejszych rozszerzeñ HTMLa. Dodatkowo jest w miarê stabilna. Jedyn±
232 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
233 statycznie skonsolidowana z qt.
234
235 %prep
236 %ifarch %{ix86}
237 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{ver}-%{rel}-%{type}-qt.i386-en
238 %endif
239 %ifarch sparc sparc64
240 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{ver}-%{rel}-%{type}-qt.sparc-en
241 %endif
242 %ifarch ppc
243 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{ver}-%{rel}-%{type}-qt.ppc-en
244 %endif
245
246 %install
247 rm -rf $RPM_BUILD_ROOT
248
249 install -d $RPM_BUILD_ROOT{/etc,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
250
251 cat install.sh | sed 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' > install2.sh
252 mv install2.sh install.sh
253
254 echo y |\
255 sh install.sh \
256   --prefix=$RPM_BUILD_ROOT%{_prefix} \
257   --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
258   --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
259   --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
260   --exec_prefix=$RPM_BUILD_ROOT%{_datadir}/opera/bin \
261   --plugindir=$RPM_BUILD_ROOT%{_plugindir}
262
263 # man install
264 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
265
266 # wrapper correction
267 sed s#$RPM_BUILD_ROOT## > $RPM_BUILD_ROOT%{_bindir}/opera2 $RPM_BUILD_ROOT%{_bindir}/opera
268 mv $RPM_BUILD_ROOT%{_bindir}/opera2 $RPM_BUILD_ROOT%{_bindir}/opera
269
270 # install in kde etc.
271 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
272
273 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
274
275 # symlink który niweluje burkanie siê opery :>
276 #ln -sf %{_datadir}/opera/ $RPM_BUILD_ROOT/usr/share/
277 #ln -sf %{_libdir}/opera $RPM_BUILD_ROOT/usr/lib/
278
279 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
280
281 # always use wrapper linked with libXm.so.3
282 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
283 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
284 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
285
286 # %{_libdir} is not the best place for it but opera doesn't search for it in better
287 # places :/
288 install lib/spellcheck.so $RPM_BUILD_ROOT%{_libdir}
289
290 %clean
291 rm -rf $RPM_BUILD_ROOT
292
293 %files
294 %defattr(644,root,root,755)
295 %doc LICENSE bugreport help
296 %attr(755,root,root) %{_bindir}/*
297 %dir %{_datadir}/opera
298 %dir %{_datadir}/opera/bin
299 %attr(755,root,root) %{_datadir}/opera/bin/*
300 %{_datadir}/opera/config
301 %{_datadir}/opera/help
302 %{_datadir}/opera/images
303 %{_datadir}/opera/java
304 %{_datadir}/opera/skin
305 %{_datadir}/opera/styles
306 %{_datadir}/opera/ini
307 %{_datadir}/opera/search.ini
308 %{_datadir}/opera/*.html
309 %{_datadir}/opera/*.ssr
310 %{_datadir}/opera/*.txt
311 %ifarch %{ix86}
312 %attr(755,root,root) %{_datadir}/opera/chartables.bin
313 %endif
314 %ifarch ppc
315 %attr(755,root,root) %{_datadir}/opera/chartables-be.bin
316 %endif
317 %attr(755,root,root) %{_datadir}/opera/opera6.adr
318 %attr(755,root,root) %{_libdir}/*.so
319 %dir %{_libdir}/opera
320 %dir %{_plugindir}
321 %attr(755,root,root) %{_plugindir}/*
322
323 %dir %{_datadir}/opera/locale
324 %{_datadir}/opera/locale/en
325 %{_datadir}/opera/locale/english.lng
326
327 %{_pixmapsdir}/opera.xpm
328 %{_desktopdir}/*.desktop
329
330 %{_mandir}/man1/opera.1*
This page took 0.060131 seconds and 4 git commands to generate.