]> git.pld-linux.org Git - packages/sbcl.git/blob - sbcl.spec
d22c94cc7293d56d532449d38218d69f35512fa7
[packages/sbcl.git] / sbcl.spec
1 # NOTE: tests >100 processes, so ensure proper ulimit
2 #
3 # Conditional build:
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
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.4
16 Release:        1
17 License:        MIT
18 Group:          Development/Languages
19 Source0:        http://download.sourceforge.net/sbcl/%{name}-%{version}-source.tar.bz2
20 # Source0-md5:  dab60bd97609524a69184651b1ce3d27
21 Source1:        sbcl.sh
22 Source2:        sbcl.rc
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}
44 BuildRequires:  sbcl
45 %endif
46 %if %{with doc}
47 BuildRequires:  tetex-dvips
48 BuildRequires:  texinfo-texi2dvi
49 %endif
50 %if %{with cl_controller}
51 Requires(post,preun):   common-lisp-controller
52 Requires:       common-lisp-controller
53 %endif
54 %if %{without clisp}
55 %{?with_bootstrap:ExclusiveArch:        %{ix86} %{x8664} aarch64}
56 # also: %{arm} alpha mips mipsel ppc sparc
57 %endif
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
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.
64
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.
69
70 %package doc-info
71 Summary:        The Steel Bank Common Lisp documentation (info)
72 Summary(pl.UTF-8):      Dokumentacja Steel Bank Common Lisp (info)
73 Group:          Development/Languages
74
75 %description doc-info
76 Documentation of Steel Bank Common Lisp (SBCL) in info format.
77
78 %description doc-info -l pl.UTF-8
79 Dokumentacja Steel Bank Common Lisp (SBCL) w formacie info.
80
81 %package doc-html
82 Summary:        The Steel Bank Common Lisp documentation (HTML)
83 Summary(pl.UTF-8):      Dokumentacja Steel Bank Common Lisp (HTML)
84 Group:          Development/Languages
85
86 %description doc-html
87 Documentation of Steel Bank Common Lisp (SBCL) in HTML format.
88
89 %description doc-html -l pl.UTF-8
90 Dokumentacja Steel Bank Common Lisp (SBCL) w formacie HTML.
91
92 %package doc-pdf
93 Summary:        The Steel Bank Common Lisp documentation (PDF)
94 Summary(pl.UTF-8):      Dokumentacja Steel Bank Common Lisp (PDF)
95 Group:          Development/Languages
96
97 %description doc-pdf
98 Documentation of Steel Bank Common Lisp (SBCL) in PDF format.
99
100 %description doc-pdf -l pl.UTF-8
101 Dokumentacja Steel Bank Common Lisp (SBCL) w formacie PDF.
102
103 %prep
104 %if %{with bootstrap}
105 %ifarch %{ix86}
106 %setup -q -a 10
107 %endif
108 %ifarch %{x8664}
109 %setup -q -a 11
110 %endif
111 %ifarch aarch64
112 %setup -q -a 12
113 %endif
114 %else
115 %setup -q
116 %endif
117 %patch0 -p1
118 %ifarch %{ix86} %{x8664}
119 %patch1 -p1
120 %endif
121 %patch2 -p1
122
123 %if %{with bootstrap}
124 mkdir sbcl-bootstrap
125 cd sbcl-*-linux
126 INSTALL_ROOT=`pwd`/../sbcl-bootstrap sh ./install.sh
127 cd -
128 %endif
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
135 %if %{with clisp}
136 %define bootstrap_cl clisp
137 %endif
138
139 %build
140 export GNUMAKE="make"
141 export SBCL_MAKE_JOBS="%{_smp_mflags}"
142 export CC="%{__cc}"
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}
147 %endif
148 ./make.sh \
149         --prefix=%{_prefix} \
150         %{?bootstrap_cl:--xc-host=%{bootstrap_cl}}
151
152 %if %{with doc}
153 %{__make} -C doc/manual -j1
154 %endif
155
156 %install
157 rm -rf $RPM_BUILD_ROOT
158 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir},%{_infodir}} \
159         $RPM_BUILD_ROOT/etc/env.d
160
161 env -u SBCL_HOME INSTALL_ROOT=`pwd`/_install %{_buildshell} ./install.sh
162
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}
166 %if %{with doc}
167 %{__mv} _install/share/info/*.info* $RPM_BUILD_ROOT%{_infodir}
168 %endif
169
170 echo SBCL_HOME=%{_libdir}/%{name} > $RPM_BUILD_ROOT/etc/env.d/SBCL_HOME
171
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
179 %endif
180
181 %clean
182 rm -rf $RPM_BUILD_ROOT
183
184 %post
185 %env_update
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 ||:
189 %endif
190
191 %postun
192 %env_update
193
194 %if %{with cl_controller}
195 if [ $1 -eq 0 ]; then
196         /usr/sbin/unregister-common-lisp-implementation sbcl >/dev/null 2>&1 ||:
197 fi
198 %endif
199
200 %if %{with doc}
201 %post doc-info  -p /sbin/postshell
202 -/usr/sbin/fix-info-dir -c %{_infodir}
203
204 %postun doc-info
205 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
206 %endif
207
208 %files
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
223 %else
224 %{_libdir}/%{name}/sbcl.core
225 %endif
226
227 %if %{with doc}
228 %files doc-info
229 %defattr(644,root,root,755)
230 %{_infodir}/asdf.info*
231 %{_infodir}/sbcl.info*
232
233 %files doc-html
234 %defattr(644,root,root,755)
235 %doc _install/share/doc/sbcl/*.html
236
237 %files doc-pdf
238 %defattr(644,root,root,755)
239 %doc _install/share/doc/sbcl/*.pdf
240 %endif
This page took 0.058935 seconds and 2 git commands to generate.