]>
Commit | Line | Data |
---|---|---|
535364a4 | 1 | # NOTE: tests >100 processes, so ensure proper ulimit |
8e4ff5ca | 2 | # |
3 | # Conditional build: | |
8e64e27e | 4 | %bcond_with bootstrap # bootstrap build |
452c3dd1 | 5 | %bcond_with doc # build with documentation |
8e4ff5ca | 6 | %bcond_with clisp # build using clisp instead of sbcl |
294d3014 | 7 | %bcond_without cl_controller # common-lisp-controller support |
8e4ff5ca | 8 | # |
e22d414a | 9 | # To build with an unpackaged Common Lisp implementation, |
10 | # pass --define bootstrap_cl /path/to/lisp/binary to builder. | |
11 | # | |
6114c569 | 12 | Summary: The Steel Bank Common Lisp development environment |
18060869 | 13 | Summary(pl.UTF-8): Środowisko programowania Steel Bank Common Lisp |
6114c569 | 14 | Name: sbcl |
5977198a | 15 | Version: 2.1.5 |
d117b6ac | 16 | Release: 1 |
6114c569 | 17 | License: MIT |
18 | Group: Development/Languages | |
fa2b18a0 | 19 | Source0: https://download.sourceforge.net/sbcl/%{name}-%{version}-source.tar.bz2 |
5977198a | 20 | # Source0-md5: 19938d42d4693de6397793b7fa5a93a2 |
294d3014 JB |
21 | Source1: sbcl.sh |
22 | Source2: sbcl.rc | |
23 | Source3: sbcl-install-clc.lisp | |
fa2b18a0 | 24 | Source10: https://download.sourceforge.net/sbcl/sbcl-1.4.3-x86-linux-binary.tar.bz2 |
d6603774 | 25 | # Source10-md5: 1c022d7ac6a8154de9ae09eb9ecfc696 |
5977198a JP |
26 | Source11: https://download.sourceforge.net/sbcl/sbcl-2.1.5-x86-64-linux-binary.tar.bz2 |
27 | # Source11-md5: 65d30756f15a8e80bf710f262e1e6dd6 | |
fa2b18a0 | 28 | Source12: https://download.sourceforge.net/sbcl/sbcl-1.4.2-arm64-linux-binary.tar.bz2 |
66e1fd2f | 29 | # Source12-md5: 79a1d4624a8138564be96274707c180d |
535364a4 | 30 | # TODO (portability) - also available: |
535364a4 JB |
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 | |
9edfda11 | 38 | Patch0: %{name}-tests.patch |
e6c34555 | 39 | Patch1: %{name}-threads.patch |
535364a4 | 40 | Patch2: %{name}-info.patch |
04ad5fa2 | 41 | Patch3: %{name}-libpath.patch |
185e16eb | 42 | URL: http://sbcl.sourceforge.net/ |
c7dd8c2f | 43 | %{?with_clisp:BuildRequires: clisp} |
8e64e27e JP |
44 | %if %{without bootstrap} && %{without clisp} |
45 | BuildRequires: sbcl | |
46 | %endif | |
8e4ff5ca | 47 | %if %{with doc} |
48 | BuildRequires: tetex-dvips | |
49 | BuildRequires: texinfo-texi2dvi | |
50 | %endif | |
39b76461 | 51 | %{?with_bootstrap:BuildConflicts: sbcl} |
294d3014 JB |
52 | %if %{with cl_controller} |
53 | Requires(post,preun): common-lisp-controller | |
54 | Requires: common-lisp-controller | |
55 | %endif | |
535364a4 | 56 | %if %{without clisp} |
66e1fd2f JP |
57 | %{?with_bootstrap:ExclusiveArch: %{ix86} %{x8664} aarch64} |
58 | # also: %{arm} alpha mips mipsel ppc sparc | |
535364a4 | 59 | %endif |
6114c569 | 60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
61 | ||
62 | %description | |
63 | Steel Bank Common Lisp (SBCL) is a Open Source development environment | |
535364a4 JB |
64 | for Common Lisp based on CMUCL. It includes an integrated native |
65 | compiler, interpreter, and debugger. | |
6114c569 | 66 | |
e072deaa JR |
67 | %description -l pl.UTF-8 |
68 | Steel Bank Common Lisp (SBCL) to środowisko programistyczne Open | |
b68b5ff6 JB |
69 | Source dla Common Lispa oparte na CMUCL. Zawiera zintegrowany natywny |
70 | kompilator, interpreter i debugger. | |
6114c569 | 71 | |
33b06ddc | 72 | %package doc-info |
73 | Summary: The Steel Bank Common Lisp documentation (info) | |
18060869 | 74 | Summary(pl.UTF-8): Dokumentacja Steel Bank Common Lisp (info) |
33b06ddc | 75 | Group: Development/Languages |
76 | ||
77 | %description doc-info | |
78 | Documentation of Steel Bank Common Lisp (SBCL) in info format. | |
79 | ||
e072deaa | 80 | %description doc-info -l pl.UTF-8 |
33b06ddc | 81 | Dokumentacja Steel Bank Common Lisp (SBCL) w formacie info. |
82 | ||
83 | %package doc-html | |
84 | Summary: The Steel Bank Common Lisp documentation (HTML) | |
18060869 | 85 | Summary(pl.UTF-8): Dokumentacja Steel Bank Common Lisp (HTML) |
33b06ddc | 86 | Group: Development/Languages |
87 | ||
88 | %description doc-html | |
89 | Documentation of Steel Bank Common Lisp (SBCL) in HTML format. | |
90 | ||
e072deaa | 91 | %description doc-html -l pl.UTF-8 |
33b06ddc | 92 | Dokumentacja Steel Bank Common Lisp (SBCL) w formacie HTML. |
93 | ||
94 | %package doc-pdf | |
95 | Summary: The Steel Bank Common Lisp documentation (PDF) | |
18060869 | 96 | Summary(pl.UTF-8): Dokumentacja Steel Bank Common Lisp (PDF) |
33b06ddc | 97 | Group: Development/Languages |
98 | ||
99 | %description doc-pdf | |
100 | Documentation of Steel Bank Common Lisp (SBCL) in PDF format. | |
101 | ||
e072deaa | 102 | %description doc-pdf -l pl.UTF-8 |
33b06ddc | 103 | Dokumentacja Steel Bank Common Lisp (SBCL) w formacie PDF. |
104 | ||
6114c569 | 105 | %prep |
8e64e27e | 106 | %if %{with bootstrap} |
c7dd8c2f JR |
107 | %ifarch %{ix86} |
108 | %setup -q -a 10 | |
109 | %endif | |
110 | %ifarch %{x8664} | |
111 | %setup -q -a 11 | |
112 | %endif | |
66e1fd2f JP |
113 | %ifarch aarch64 |
114 | %setup -q -a 12 | |
115 | %endif | |
8e64e27e JP |
116 | %else |
117 | %setup -q | |
118 | %endif | |
9edfda11 | 119 | %patch0 -p1 |
e6c34555 | 120 | %ifarch %{ix86} %{x8664} |
121 | %patch1 -p1 | |
122 | %endif | |
2f19d43a | 123 | %patch2 -p1 |
04ad5fa2 | 124 | %patch3 -p1 |
6114c569 | 125 | |
8e64e27e | 126 | %if %{with bootstrap} |
c7dd8c2f JR |
127 | mkdir sbcl-bootstrap |
128 | cd sbcl-*-linux | |
129 | INSTALL_ROOT=`pwd`/../sbcl-bootstrap sh ./install.sh | |
130 | cd - | |
8e64e27e | 131 | %endif |
c7dd8c2f JR |
132 | |
133 | # clean.sh is so stupid it removed sbcl-bootstrap contents | |
134 | %{__mv} clean.sh clean.sh.orig | |
135 | echo "#!/bin/sh" >clean.sh | |
136 | chmod 755 clean.sh | |
137 | ||
8e4ff5ca | 138 | %if %{with clisp} |
2606bbf9 | 139 | %define bootstrap_cl clisp |
e22d414a | 140 | %endif |
8e4ff5ca | 141 | |
6114c569 | 142 | %build |
535364a4 | 143 | export GNUMAKE="make" |
172f418d | 144 | export SBCL_MAKE_JOBS="%{_smp_mflags}" |
535364a4 JB |
145 | export CC="%{__cc}" |
146 | export CFLAGS="%{rpmcflags}" | |
04ad5fa2 | 147 | export CPPFLAGS="%{rpmcppflags} -DSBCL_LIBPATH=\\\"../%{_lib}/sbcl\\\"" |
c95f5e14 | 148 | export LDFLAGS="%{rpmldflags}" |
8e64e27e | 149 | %if %{with bootstrap} |
c7dd8c2f JR |
150 | export SBCL_HOME=`pwd`/sbcl-bootstrap/lib/sbcl |
151 | export PATH=`pwd`/sbcl-bootstrap/bin:${PATH} | |
8e64e27e | 152 | %endif |
c95f5e14 | 153 | %{__sed} -i -e 's/^CFLAGS/#CFLAGS/' src/runtime/GNUmakefile |
c7dd8c2f JR |
154 | ./make.sh \ |
155 | --prefix=%{_prefix} \ | |
2606bbf9 | 156 | %{?bootstrap_cl:--xc-host=%{bootstrap_cl}} |
c7dd8c2f | 157 | |
8e4ff5ca | 158 | %if %{with doc} |
535364a4 | 159 | %{__make} -C doc/manual -j1 |
8e4ff5ca | 160 | %endif |
6114c569 | 161 | |
162 | %install | |
163 | rm -rf $RPM_BUILD_ROOT | |
c7dd8c2f JR |
164 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir},%{_infodir}} \ |
165 | $RPM_BUILD_ROOT/etc/env.d | |
166 | ||
e22d414a | 167 | env -u SBCL_HOME INSTALL_ROOT=`pwd`/_install %{_buildshell} ./install.sh |
c7dd8c2f JR |
168 | |
169 | %{__mv} _install/lib/sbcl $RPM_BUILD_ROOT%{_libdir}/%{name} | |
170 | %{__mv} _install/bin/sbcl $RPM_BUILD_ROOT%{_bindir}/%{name} | |
171 | %{__mv} _install/share/man/* $RPM_BUILD_ROOT%{_mandir} | |
e22d414a | 172 | %if %{with doc} |
c7dd8c2f | 173 | %{__mv} _install/share/info/*.info* $RPM_BUILD_ROOT%{_infodir} |
e22d414a | 174 | %endif |
175 | ||
176 | echo SBCL_HOME=%{_libdir}/%{name} > $RPM_BUILD_ROOT/etc/env.d/SBCL_HOME | |
6114c569 | 177 | |
294d3014 JB |
178 | %if %{with cl_controller} |
179 | install -d $RPM_BUILD_ROOT{/usr/lib/common-lisp/bin,%{_sysconfdir}} | |
180 | %{__sed} -e 's,/usr/lib/sbcl,%{_libdir}/%{name},g' %{SOURCE1} >$RPM_BUILD_ROOT/usr/lib/common-lisp/bin/sbcl.sh | |
181 | install -Dp %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sbcl.rc | |
182 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/%{name}/install-clc.lisp | |
183 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/sbcl.core $RPM_BUILD_ROOT%{_libdir}/%{name}/sbcl-dist.core | |
184 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/sbcl.core | |
185 | %endif | |
186 | ||
6114c569 | 187 | %clean |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | ||
e22d414a | 190 | %post |
191 | %env_update | |
db31b6d0 JB |
192 | %if %{with cl_controller} |
193 | test -f %{_libdir}/%{name}/sbcl.core || cp -p %{_libdir}/%{name}/sbcl-dist.core %{_libdir}/%{name}/sbcl.core | |
294d3014 JB |
194 | /usr/sbin/register-common-lisp-implementation sbcl >/dev/null 2>&1 ||: |
195 | %endif | |
e22d414a | 196 | |
197 | %postun | |
198 | %env_update | |
199 | ||
db31b6d0 | 200 | %if %{with cl_controller} |
294d3014 | 201 | if [ $1 -eq 0 ]; then |
db31b6d0 | 202 | /usr/sbin/unregister-common-lisp-implementation sbcl >/dev/null 2>&1 ||: |
54f94c02 | 203 | fi |
294d3014 JB |
204 | %endif |
205 | ||
e22d414a | 206 | %if %{with doc} |
c7dd8c2f | 207 | %post doc-info -p /sbin/postshell |
17eb1cbb | 208 | -/usr/sbin/fix-info-dir -c %{_infodir} |
33b06ddc | 209 | |
210 | %postun doc-info | |
33b06ddc | 211 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 |
e22d414a | 212 | %endif |
33b06ddc | 213 | |
6114c569 | 214 | %files |
215 | %defattr(644,root,root,755) | |
535364a4 JB |
216 | %doc _install/share/doc/sbcl/{BUGS,COPYING,CREDITS,NEWS} |
217 | %attr (755,root,root) %{_bindir}/sbcl | |
294d3014 JB |
218 | %dir %{_libdir}/%{name} |
219 | %{_libdir}/%{name}/contrib | |
535364a4 JB |
220 | %{_mandir}/man1/sbcl.1* |
221 | %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/SBCL_HOME | |
294d3014 JB |
222 | %if %{with cl_controller} |
223 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sbcl.rc | |
224 | %attr(744,root,root) /usr/lib/common-lisp/bin/sbcl.sh | |
225 | %{_libdir}/%{name}/install-clc.lisp | |
226 | %{_libdir}/%{name}/sbcl-dist.core | |
d1015534 | 227 | %{_libdir}/%{name}/sbcl.mk |
294d3014 JB |
228 | %ghost %{_libdir}/%{name}/sbcl.core |
229 | %else | |
230 | %{_libdir}/%{name}/sbcl.core | |
231 | %endif | |
33b06ddc | 232 | |
8e4ff5ca | 233 | %if %{with doc} |
33b06ddc | 234 | %files doc-info |
235 | %defattr(644,root,root,755) | |
535364a4 JB |
236 | %{_infodir}/asdf.info* |
237 | %{_infodir}/sbcl.info* | |
33b06ddc | 238 | |
239 | %files doc-html | |
240 | %defattr(644,root,root,755) | |
c7dd8c2f | 241 | %doc _install/share/doc/sbcl/*.html |
33b06ddc | 242 | |
243 | %files doc-pdf | |
244 | %defattr(644,root,root,755) | |
e22d414a | 245 | %doc _install/share/doc/sbcl/*.pdf |
8e4ff5ca | 246 | %endif |