1 # NOTE: tests >100 processes, so ensure proper ulimit
4 %bcond_with bootstrap # bootstrap build
5 %bcond_without doc # build without documentation
6 %bcond_with clisp # build using clisp instead of sbcl
7 %bcond_without cl_controller # common-lisp-controller support
9 # To build with an unpackaged Common Lisp implementation,
10 # pass --define bootstrap_cl /path/to/lisp/binary to builder.
12 Summary: The Steel Bank Common Lisp development environment
13 Summary(pl.UTF-8): Środowisko programowania Steel Bank Common Lisp
18 Group: Development/Languages
19 Source0: http://download.sourceforge.net/sbcl/%{name}-%{version}-source.tar.bz2
20 # Source0-md5: dab60bd97609524a69184651b1ce3d27
23 Source3: sbcl-install-clc.lisp
24 Source10: http://download.sourceforge.net/sbcl/sbcl-1.4.3-x86-linux-binary.tar.bz2
25 # Source10-md5: 1c022d7ac6a8154de9ae09eb9ecfc696
26 Source11: http://download.sourceforge.net/sbcl/sbcl-2.1.4-x86-64-linux-binary.tar.bz2
27 # Source11-md5: 8d13c4827812faba6d52313860192004
28 Source12: http://download.sourceforge.net/sbcl/sbcl-1.4.2-arm64-linux-binary.tar.bz2
29 # Source12-md5: 79a1d4624a8138564be96274707c180d
30 # TODO (portability) - also available:
31 #SourceXX: http://download.sourceforge.net/sbcl/sbcl-1.3.9-armhf-linux-binary.tar.bz2
32 #SourceXX: http://download.sourceforge.net/sbcl/sbcl-1.2.7-armel-linux-binary.tar.bz2
33 #SourceXX: http://download.sourceforge.net/sbcl/sbcl-1.2.7-powerpc-linux-binary.tar.bz2
34 #SourceXX: http://download.sourceforge.net/sbcl/sbcl-1.0.23-mips-linux-binary.tar.bz2
35 #SourceXX: http://download.sourceforge.net/sbcl/sbcl-1.0.28-mipsel-linux-binary.tar.bz2
36 #SourceXX: http://download.sourceforge.net/sbcl/sbcl-1.0.28-alpha-linux-binary.tar.bz2
37 #SourceXX: http://download.sourceforge.net/sbcl/sbcl-1.0.28-sparc-linux-binary.tar.bz2
38 Patch0: %{name}-tests.patch
39 Patch1: %{name}-threads.patch
40 Patch2: %{name}-info.patch
41 URL: http://sbcl.sourceforge.net/
42 %{?with_clisp:BuildRequires: clisp}
43 %if %{without bootstrap} && %{without clisp}
47 BuildRequires: tetex-dvips
48 BuildRequires: texinfo-texi2dvi
50 %if %{with cl_controller}
51 Requires(post,preun): common-lisp-controller
52 Requires: common-lisp-controller
55 %{?with_bootstrap:ExclusiveArch: %{ix86} %{x8664} aarch64}
56 # also: %{arm} alpha mips mipsel ppc sparc
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 Steel Bank Common Lisp (SBCL) is a Open Source development environment
62 for Common Lisp based on CMUCL. It includes an integrated native
63 compiler, interpreter, and debugger.
65 %description -l pl.UTF-8
66 Steel Bank Common Lisp (SBCL) to środowisko programistyczne Open
67 Source dla Common Lispa oparte na CMUCL. Zawiera zintegrowany natywny
68 kompilator, interpreter i debugger.
71 Summary: The Steel Bank Common Lisp documentation (info)
72 Summary(pl.UTF-8): Dokumentacja Steel Bank Common Lisp (info)
73 Group: Development/Languages
76 Documentation of Steel Bank Common Lisp (SBCL) in info format.
78 %description doc-info -l pl.UTF-8
79 Dokumentacja Steel Bank Common Lisp (SBCL) w formacie info.
82 Summary: The Steel Bank Common Lisp documentation (HTML)
83 Summary(pl.UTF-8): Dokumentacja Steel Bank Common Lisp (HTML)
84 Group: Development/Languages
87 Documentation of Steel Bank Common Lisp (SBCL) in HTML format.
89 %description doc-html -l pl.UTF-8
90 Dokumentacja Steel Bank Common Lisp (SBCL) w formacie HTML.
93 Summary: The Steel Bank Common Lisp documentation (PDF)
94 Summary(pl.UTF-8): Dokumentacja Steel Bank Common Lisp (PDF)
95 Group: Development/Languages
98 Documentation of Steel Bank Common Lisp (SBCL) in PDF format.
100 %description doc-pdf -l pl.UTF-8
101 Dokumentacja Steel Bank Common Lisp (SBCL) w formacie PDF.
104 %if %{with bootstrap}
118 %ifarch %{ix86} %{x8664}
123 %if %{with bootstrap}
126 INSTALL_ROOT=`pwd`/../sbcl-bootstrap sh ./install.sh
130 # clean.sh is so stupid it removed sbcl-bootstrap contents
131 %{__mv} clean.sh clean.sh.orig
132 echo "#!/bin/sh" >clean.sh
136 %define bootstrap_cl clisp
140 export GNUMAKE="make"
141 export SBCL_MAKE_JOBS="%{_smp_mflags}"
143 export CFLAGS="%{rpmcflags}"
144 %if %{with bootstrap}
145 export SBCL_HOME=`pwd`/sbcl-bootstrap/lib/sbcl
146 export PATH=`pwd`/sbcl-bootstrap/bin:${PATH}
149 --prefix=%{_prefix} \
150 %{?bootstrap_cl:--xc-host=%{bootstrap_cl}}
153 %{__make} -C doc/manual -j1
157 rm -rf $RPM_BUILD_ROOT
158 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir},%{_infodir}} \
159 $RPM_BUILD_ROOT/etc/env.d
161 env -u SBCL_HOME INSTALL_ROOT=`pwd`/_install %{_buildshell} ./install.sh
163 %{__mv} _install/lib/sbcl $RPM_BUILD_ROOT%{_libdir}/%{name}
164 %{__mv} _install/bin/sbcl $RPM_BUILD_ROOT%{_bindir}/%{name}
165 %{__mv} _install/share/man/* $RPM_BUILD_ROOT%{_mandir}
167 %{__mv} _install/share/info/*.info* $RPM_BUILD_ROOT%{_infodir}
170 echo SBCL_HOME=%{_libdir}/%{name} > $RPM_BUILD_ROOT/etc/env.d/SBCL_HOME
172 %if %{with cl_controller}
173 install -d $RPM_BUILD_ROOT{/usr/lib/common-lisp/bin,%{_sysconfdir}}
174 %{__sed} -e 's,/usr/lib/sbcl,%{_libdir}/%{name},g' %{SOURCE1} >$RPM_BUILD_ROOT/usr/lib/common-lisp/bin/sbcl.sh
175 install -Dp %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sbcl.rc
176 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/%{name}/install-clc.lisp
177 %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/sbcl.core $RPM_BUILD_ROOT%{_libdir}/%{name}/sbcl-dist.core
178 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/sbcl.core
182 rm -rf $RPM_BUILD_ROOT
186 %if %{with cl_controller}
187 test -f %{_libdir}/%{name}/sbcl.core || cp -p %{_libdir}/%{name}/sbcl-dist.core %{_libdir}/%{name}/sbcl.core
188 /usr/sbin/register-common-lisp-implementation sbcl >/dev/null 2>&1 ||:
194 %if %{with cl_controller}
195 if [ $1 -eq 0 ]; then
196 /usr/sbin/unregister-common-lisp-implementation sbcl >/dev/null 2>&1 ||:
201 %post doc-info -p /sbin/postshell
202 -/usr/sbin/fix-info-dir -c %{_infodir}
205 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
209 %defattr(644,root,root,755)
210 %doc _install/share/doc/sbcl/{BUGS,COPYING,CREDITS,NEWS}
211 %attr (755,root,root) %{_bindir}/sbcl
212 %dir %{_libdir}/%{name}
213 %{_libdir}/%{name}/contrib
214 %{_mandir}/man1/sbcl.1*
215 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/SBCL_HOME
216 %if %{with cl_controller}
217 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sbcl.rc
218 %attr(744,root,root) /usr/lib/common-lisp/bin/sbcl.sh
219 %{_libdir}/%{name}/install-clc.lisp
220 %{_libdir}/%{name}/sbcl-dist.core
221 %{_libdir}/%{name}/sbcl.mk
222 %ghost %{_libdir}/%{name}/sbcl.core
224 %{_libdir}/%{name}/sbcl.core
229 %defattr(644,root,root,755)
230 %{_infodir}/asdf.info*
231 %{_infodir}/sbcl.info*
234 %defattr(644,root,root,755)
235 %doc _install/share/doc/sbcl/*.html
238 %defattr(644,root,root,755)
239 %doc _install/share/doc/sbcl/*.pdf