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