]> git.pld-linux.org Git - packages/sbcl.git/blob - sbcl.spec
fix overriden CFLAGS; add CPPFLAGS and LDFLAGS
[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 export CPPFLAGS="%{rpmcppflags}"
145 export LDFLAGS="%{rpmldflags}"
146 %if %{with bootstrap}
147 export SBCL_HOME=`pwd`/sbcl-bootstrap/lib/sbcl
148 export PATH=`pwd`/sbcl-bootstrap/bin:${PATH}
149 %endif
150 %{__sed} -i -e 's/^CFLAGS/#CFLAGS/' src/runtime/GNUmakefile
151 ./make.sh \
152         --prefix=%{_prefix} \
153         %{?bootstrap_cl:--xc-host=%{bootstrap_cl}}
154
155 %if %{with doc}
156 %{__make} -C doc/manual -j1
157 %endif
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir},%{_infodir}} \
162         $RPM_BUILD_ROOT/etc/env.d
163
164 env -u SBCL_HOME INSTALL_ROOT=`pwd`/_install %{_buildshell} ./install.sh
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}
169 %if %{with doc}
170 %{__mv} _install/share/info/*.info* $RPM_BUILD_ROOT%{_infodir}
171 %endif
172
173 echo SBCL_HOME=%{_libdir}/%{name} > $RPM_BUILD_ROOT/etc/env.d/SBCL_HOME
174
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
184 %clean
185 rm -rf $RPM_BUILD_ROOT
186
187 %post
188 %env_update
189 %if %{with cl_controller}
190 test -f %{_libdir}/%{name}/sbcl.core || cp -p %{_libdir}/%{name}/sbcl-dist.core %{_libdir}/%{name}/sbcl.core
191 /usr/sbin/register-common-lisp-implementation sbcl >/dev/null 2>&1 ||:
192 %endif
193
194 %postun
195 %env_update
196
197 %if %{with cl_controller}
198 if [ $1 -eq 0 ]; then
199         /usr/sbin/unregister-common-lisp-implementation sbcl >/dev/null 2>&1 ||:
200 fi
201 %endif
202
203 %if %{with doc}
204 %post doc-info  -p /sbin/postshell
205 -/usr/sbin/fix-info-dir -c %{_infodir}
206
207 %postun doc-info
208 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
209 %endif
210
211 %files
212 %defattr(644,root,root,755)
213 %doc _install/share/doc/sbcl/{BUGS,COPYING,CREDITS,NEWS}
214 %attr (755,root,root) %{_bindir}/sbcl
215 %dir %{_libdir}/%{name}
216 %{_libdir}/%{name}/contrib
217 %{_mandir}/man1/sbcl.1*
218 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/SBCL_HOME
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
224 %{_libdir}/%{name}/sbcl.mk
225 %ghost %{_libdir}/%{name}/sbcl.core
226 %else
227 %{_libdir}/%{name}/sbcl.core
228 %endif
229
230 %if %{with doc}
231 %files doc-info
232 %defattr(644,root,root,755)
233 %{_infodir}/asdf.info*
234 %{_infodir}/sbcl.info*
235
236 %files doc-html
237 %defattr(644,root,root,755)
238 %doc _install/share/doc/sbcl/*.html
239
240 %files doc-pdf
241 %defattr(644,root,root,755)
242 %doc _install/share/doc/sbcl/*.pdf
243 %endif
This page took 0.243423 seconds and 3 git commands to generate.