2 # - SECURITY: http://securitytracker.com/alerts/2004/Jul/1010780.html
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
10 %define shver %(echo %{ver} | tr -d .)
11 %define dirrel 20040803
12 # type of release, usually final or beta or Preview-4 for snaps
14 %define x86_shared_rel %{dirrel}.5
15 %define x86_static_rel %{dirrel}.1
16 %define sparc_shared_rel %{dirrel}.2
17 %define sparc_static_rel %{dirrel}.1
18 %define ppc_shared_rel %{dirrel}.2
19 %define ppc_static_rel %{dirrel}.1
23 %define rel %{x86_shared_rel}
26 %define rel %{sparc_shared_rel}
29 %define rel %{ppc_shared_rel}
34 %define rel %{x86_static_rel}
37 %define rel %{sparc_static_rel}
40 %define rel %{ppc_static_rel}
44 Summary: World fastest web browser
45 Summary(pl): Najszybsza przegl±darka WWW na ¶wiecie
47 Version: %{ver}.%{rel}
49 License: Distributable for PLD until 31 Dec 2006 - http://distribute.opera.com/ (otherwise restricted, see file LICENSE)
50 Group: X11/Applications/Networking
52 %{!?with_incall:%ifarch %{ix86}}
54 Source0: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/static/%{name}-%{ver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
55 # Source0-md5: 0a7e933ef593d4b7a897041c9f87bba2
57 Source100: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{ver}-%{x86_static_rel}-static-qt.i386-en.tar.bz2
59 %{!?with_distributable:NoSource: 0}
65 Source1: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/sparc/static/%{name}-%{ver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
66 # Source1-md5: 04976a6ace7a4345ce5e4cf763159939
68 Source101: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{ver}-%{sparc_static_rel}-static-qt.sparc-en.tar.bz2
70 %{!?with_distributable:NoSource: 1}
76 Source2: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/ppc/static/%{name}-%{ver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
77 # Source2-md5: c11a4c78d18bdaa4bd338b4c0dc27f38
79 Source102: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{ver}-%{ppc_static_rel}-static-qt.ppc-en.tar.bz2
81 %{!?with_distributable:NoSource: 2}
82 %{!?with_incall:%endif}
84 %{!?with_incall:%ifarch %{ix86}}
86 Source20: ftp://ftp.opera.com/pub/opera/linux/%{shver}/%{reltype}/en/i386/shared/%{name}-%{ver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
87 # Source20-md5: 0e407a050f3aa4559011a3cea707cd20
89 Source1020: http://snapshot.opera.com/unix/%{ver}-%{reltype}/intel-linux/en/%{name}-%{ver}-%{x86_shared_rel}-shared-qt.i386-en.tar.bz2
91 %{!?with_distributable:NoSource: 20}
97 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
98 # Source21-md5: d8635013dac0c98c680997fcc9dd66c4
100 Source1021: http://snapshot.opera.com/unix/%{ver}-%{reltype}/sparc-linux/en/%{name}-%{ver}-%{sparc_shared_rel}-shared-qt.sparc-en.tar.bz2
102 %{!?with_distributable:NoSource: 21}
108 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
109 # Source22-md5: 516992e68c5a710d795a1ecc791c7f4d
111 Source1022: http://snapshot.opera.com/unix/%{ver}-%{reltype}/ppc-linux/en/%{name}-%{ver}-%{ppc_shared_rel}-shared-qt.ppc-en.tar.bz2
113 %{!?with_distributable:NoSource: 22}
115 %{!?with_incall:%endif}
116 Source3: ftp://ftp.opera.com/pub/opera/unix/lng/752/pl/ou752_727pl.lng
117 # Source3-md5: 48bfd8a0d541698c70e151c81ab61408
118 Source4: %{name}.desktop
119 URL: http://www.opera.com/
120 ExclusiveArch: %{ix86} ppc sparc sparc64
121 Requires: freetype >= 2
122 Requires: openmotif >= 2
123 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
125 %define _plugindir %{_libdir}/opera/plugins
126 %define _operadocdir %{_docdir}/%{name}-%{ver}.%{rel}
127 %define configfile %{_datadir}/opera/config/opera6rc
130 Opera is world fastest web browser. It supports most of nowaday
131 extensions of HTML. And it is quite stable. Only disadvantage are
132 advertisements on the top of its window. Version static linked with
136 Opera jest najszybsz± przegl±dark± WWW na ¶wiecie. Obs³uguje wiêkszo¶æ
137 dzisiejszych rozszerzeñ HTMLa. Dodatkowo jest w miarê stabilna. Jedyn±
138 niedogodno¶ci± s± reklamy ukazuj±ce siê w górze okna. Wersja
139 statycznie skonsolidowana z qt.
143 %setup -q %{?with_shared:-T -b %{?with_snap:10}20} -n %{name}-%{ver}-%{rel}-%{type}-qt.i386-en
145 %ifarch sparc sparc64
146 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}1 -n %{name}-%{ver}-%{rel}-%{type}-qt.sparc-en
149 %setup -q -T -b %{?with_snap:10}%{?with_shared:2}2 -n %{name}-%{ver}-%{rel}-%{type}-qt.ppc-en
153 rm -rf $RPM_BUILD_ROOT
155 install -d $RPM_BUILD_ROOT{/etc,%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}}
157 cat install.sh | sed 's|/etc|$RPM_BUILD_ROOT%{_sysconfdir}|' > install2.sh
158 mv install2.sh install.sh
162 --prefix=$RPM_BUILD_ROOT%{_prefix} \
163 --wrapperdir=$RPM_BUILD_ROOT%{_bindir} \
164 --docdir=$RPM_BUILD_ROOT%{_operadocdir} \
165 --sharedir=$RPM_BUILD_ROOT%{_datadir}/opera \
166 --exec_prefix=$RPM_BUILD_ROOT%{_datadir}/opera/bin \
167 --plugindir=$RPM_BUILD_ROOT%{_plugindir}
170 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/opera/locale/polish.lng
173 install man/opera.1 $RPM_BUILD_ROOT%{_mandir}/man1
176 sed s#$RPM_BUILD_ROOT## > $RPM_BUILD_ROOT%{_bindir}/opera2 $RPM_BUILD_ROOT%{_bindir}/opera
177 mv $RPM_BUILD_ROOT%{_bindir}/opera2 $RPM_BUILD_ROOT%{_bindir}/opera
179 # install in kde etc.
180 install images/opera.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
182 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
184 # symlink który niweluje burkanie siê opery :>
185 #ln -sf %{_datadir}/opera/ $RPM_BUILD_ROOT/usr/share/
186 #ln -sf %{_libdir}/opera $RPM_BUILD_ROOT/usr/lib/
188 sed -i -e "s#$RPM_BUILD_ROOT##g" $RPM_BUILD_ROOT%{_datadir}/opera/java/*.policy
190 # always use wrapper linked with libXm.so.3
191 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper
192 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-2
193 ln -sf operamotifwrapper-3 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/operamotifwrapper-1
195 # %{_libdir} is not the best place for it but opera doesn't search for it in better
197 install lib/spellcheck.so $RPM_BUILD_ROOT%{_libdir}
200 rm -rf $RPM_BUILD_ROOT
203 %defattr(644,root,root,755)
204 %doc LICENSE bugreport help
205 %attr(755,root,root) %{_bindir}/*
206 %dir %{_datadir}/opera
207 %dir %{_datadir}/opera/bin
208 %attr(755,root,root) %{_datadir}/opera/bin/*
209 %{_datadir}/opera/config
210 %{_datadir}/opera/help
211 %{_datadir}/opera/images
212 %{_datadir}/opera/java
213 %{_datadir}/opera/locale
214 %{_datadir}/opera/skin
215 %{_datadir}/opera/styles
216 %{_datadir}/opera/ini
217 %{_datadir}/opera/search.ini
218 %{_datadir}/opera/*.html
219 %{_datadir}/opera/*.ssr
220 %{_datadir}/opera/*.txt
222 %attr(755,root,root) %{_datadir}/opera/chartables.bin
225 %attr(755,root,root) %{_datadir}/opera/chartables-be.bin
227 %attr(755,root,root) %{_datadir}/opera/opera6.adr
228 %attr(755,root,root) %{_libdir}/*.so
229 %dir %{_libdir}/opera
231 %attr(755,root,root) %{_plugindir}/*
233 %{_pixmapsdir}/opera.xpm
234 %{_desktopdir}/*.desktop
236 %{_mandir}/man1/opera.1*