2 # - move translations into a separate, noarch package
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
11 %define dirrel 20040824
12 %define reltype Preview-1
15 %define dirrel 20040803
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
28 # We should be able to build src.rpm also on not supported archs
29 %define rel %{x86_shared_rel}
31 %define rel %{sparc_shared_rel}
34 %define rel %{ppc_shared_rel}
38 %define rel %{x86_static_rel}
40 %define rel %{sparc_static_rel}
43 %define rel %{ppc_static_rel}
53 %define need_ix86_shared_snap 1
54 %define need_sparc_shared_snap 1
55 %define need_ppc_shared_snap 1
58 %define need_ix86_static_snap 1
59 %define need_sparc_static_snap 1
60 %define need_ppc_static_snap 1
62 # with shared; [endif]
67 %define need_ix86_shared 1
68 %define need_sparc_shared 1
69 %define need_ppc_shared 1
72 %define need_ix86_static 1
73 %define need_sparc_static 1
74 %define need_ppc_static 1
76 # with shared; [endif]
87 %define need_ix86_shared_snap 1
90 %define need_ix86_static_snap 1
92 # with shared; [endif]
97 %define need_ix86_shared 1
100 %define need_ix86_static 1
102 # with shared; [endif]
107 %ifarch sparc sparc64
113 %define need_sparc_shared_snap 1
115 # with shared: [else]
116 %define need_sparc_static_snap 1
118 # with shared; [endif]
123 %define need_sparc_shared 1
125 # with shared: [else]
126 %define need_sparc_static 1
128 # with shared; [endif]
139 %define need_ppc_shared_snap 1
141 # with shared: [else]
142 %define need_ppc_static_snap 1
144 # with shared; [endif]
149 %define need_ppc_shared 1
151 # with shared: [else]
152 %define need_ppc_static 1
154 # with shared; [endif
160 # with incall; [endif]
162 Summary: World fastest web browser
163 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
165 Version: %{ver}%{?with_snap:.%{rel}}
168 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
169 Group: X11/Applications/Networking
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}
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}
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}
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
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}
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
197 Source4: %{name}.desktop
198 %if ! %{with distributable}
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)
219 %define _plugindir %{_libdir}/opera/plugins
220 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
221 %define configfile %{_datadir}/opera/config/opera6rc
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
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.
237 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}0 -n %{name}-%{ver}-%{rel}-%{type}-qt.i386-en
239 %ifarch sparc sparc64
240 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{ver}-%{rel}-%{type}-qt.sparc-en
243 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{ver}-%{rel}-%{type}-qt.ppc-en
247 rm -rf $RPM_BUILD_ROOT
249 install -d $RPM_BUILD_ROOT{/etc,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
251 cat install.sh | sed 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' > install2.sh
252 mv install2.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}
264 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
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
270 # install in kde etc.
271 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
273 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
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/
279 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
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
286 # %{_libdir} is not the best place for it but opera doesn't search for it in better
288 install lib/spellcheck.so $RPM_BUILD_ROOT%{_libdir}
291 rm -rf $RPM_BUILD_ROOT
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
312 %attr(755,root,root) %{_datadir}/opera/chartables.bin
315 %attr(755,root,root) %{_datadir}/opera/chartables-be.bin
317 %attr(755,root,root) %{_datadir}/opera/opera6.adr
318 %attr(755,root,root) %{_libdir}/*.so
319 %dir %{_libdir}/opera
321 %attr(755,root,root) %{_plugindir}/*
323 %dir %{_datadir}/opera/locale
324 %{_datadir}/opera/locale/en
325 %{_datadir}/opera/locale/english.lng
327 %{_pixmapsdir}/opera.xpm
328 %{_desktopdir}/*.desktop
330 %{_mandir}/man1/opera.1*