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