]> git.pld-linux.org Git - packages/sbcl.git/blob - sbcl.spec
950e9a51877fcaad27b322fc36dac03e14413cb5
[packages/sbcl.git] / sbcl.spec
1 # NOTE: tests >100 processes, so ensure proper ulimit
2 #
3 # Conditional build:
4 %bcond_without  doc             # build without documentation
5 %bcond_with     clisp           # build using clisp instead of sbcl
6 #
7 # To build with an unpackaged Common Lisp implementation,
8 # pass --define bootstrap_cl /path/to/lisp/binary to builder.
9 #
10 Summary:        The Steel Bank Common Lisp development environment
11 Summary(pl.UTF-8):      Środowisko programowania Steel Bank Common Lisp
12 Name:           sbcl
13 Version:        1.3.10
14 Release:        1
15 License:        MIT
16 Group:          Development/Languages
17 Source0:        http://download.sourceforge.net/sbcl/%{name}-%{version}-source.tar.bz2
18 # Source0-md5:  c8bd43e149109127651a6917976dda4a
19 Source10:       http://download.sourceforge.net/sbcl/sbcl-1.2.7-x86-linux-binary.tar.bz2
20 # Source10-md5: f6a1b2137fbc74b4a8aaf338643f4ae2
21 Source11:       http://download.sourceforge.net/sbcl/sbcl-1.3.10-x86-64-linux-binary.tar.bz2
22 # Source11-md5: 56fe67f916ccdd84e7b739d0a731cf9f
23 # TODO (portability) - also available:
24 #SourceXX:      http://download.sourceforge.net/sbcl/sbcl-1.3.10-arm64-linux-binary.tar.bz2
25 #SourceXX:      http://download.sourceforge.net/sbcl/sbcl-1.3.9-armhf-linux-binary.tar.bz2
26 #SourceXX:      http://download.sourceforge.net/sbcl/sbcl-1.2.7-armel-linux-binary.tar.bz2
27 #SourceXX:      http://download.sourceforge.net/sbcl/sbcl-1.2.7-powerpc-linux-binary.tar.bz2
28 #SourceXX:      http://download.sourceforge.net/sbcl/sbcl-1.0.23-mips-linux-binary.tar.bz2
29 #SourceXX:      http://download.sourceforge.net/sbcl/sbcl-1.0.28-mipsel-linux-binary.tar.bz2
30 #SourceXX:      http://download.sourceforge.net/sbcl/sbcl-1.0.28-alpha-linux-binary.tar.bz2
31 #SourceXX:      http://download.sourceforge.net/sbcl/sbcl-1.0.28-sparc-linux-binary.tar.bz2
32 Patch0:         %{name}-tests.patch
33 Patch1:         %{name}-threads.patch
34 Patch2:         %{name}-info.patch
35 URL:            http://sbcl.sourceforge.net/
36 %{?with_clisp:BuildRequires:    clisp}
37 %if %{with doc}
38 BuildRequires:  tetex-dvips
39 BuildRequires:  texinfo-texi2dvi
40 %endif
41 %if %{without clisp}
42 %{!?bootstrap_cl:ExclusiveArch: %{ix86} %{x8664}}
43 # also: %{arm} aarch64 alpha mips mipsel ppc sparc
44 %endif
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 Steel Bank Common Lisp (SBCL) is a Open Source development environment
49 for Common Lisp based on CMUCL. It includes an integrated native
50 compiler, interpreter, and debugger.
51
52 %description -l pl.UTF-8
53 Steel Bank Common Lisp (SBCL) to środowisko programistyczne Open
54 Source dla Common Lispa oparte na CMUCL. Zawiera zintegrowany natywny
55 kompilator, interpreter i debugger.
56
57 %package doc-info
58 Summary:        The Steel Bank Common Lisp documentation (info)
59 Summary(pl.UTF-8):      Dokumentacja Steel Bank Common Lisp (info)
60 Group:          Development/Languages
61
62 %description doc-info
63 Documentation of Steel Bank Common Lisp (SBCL) in info format.
64
65 %description doc-info -l pl.UTF-8
66 Dokumentacja Steel Bank Common Lisp (SBCL) w formacie info.
67
68 %package doc-html
69 Summary:        The Steel Bank Common Lisp documentation (HTML)
70 Summary(pl.UTF-8):      Dokumentacja Steel Bank Common Lisp (HTML)
71 Group:          Development/Languages
72
73 %description doc-html
74 Documentation of Steel Bank Common Lisp (SBCL) in HTML format.
75
76 %description doc-html -l pl.UTF-8
77 Dokumentacja Steel Bank Common Lisp (SBCL) w formacie HTML.
78
79 %package doc-pdf
80 Summary:        The Steel Bank Common Lisp documentation (PDF)
81 Summary(pl.UTF-8):      Dokumentacja Steel Bank Common Lisp (PDF)
82 Group:          Development/Languages
83
84 %description doc-pdf
85 Documentation of Steel Bank Common Lisp (SBCL) in PDF format.
86
87 %description doc-pdf -l pl.UTF-8
88 Dokumentacja Steel Bank Common Lisp (SBCL) w formacie PDF.
89
90 %prep
91 %ifarch %{ix86}
92 %setup -q -a 10
93 %endif
94 %ifarch %{x8664}
95 %setup -q -a 11
96 %endif
97 %patch0 -p1
98 %ifarch %{ix86} %{x8664}
99 %patch1 -p1
100 %endif
101 %patch2 -p1 -b .orig
102 cp -p doc/manual/sbcl.texinfo{,.patched}
103 cp -p contrib/asdf/asdf.texinfo{,.patched}
104
105 mkdir sbcl-bootstrap
106 cd sbcl-*-linux
107 INSTALL_ROOT=`pwd`/../sbcl-bootstrap sh ./install.sh
108 cd -
109
110 # clean.sh is so stupid it removed sbcl-bootstrap contents
111 %{__mv} clean.sh clean.sh.orig
112 echo "#!/bin/sh" >clean.sh
113 chmod 755 clean.sh
114
115 %if %{with clisp}
116 %define bootstrap_cl "clisp"
117 %endif
118
119 %build
120 export GNUMAKE="make"
121 export CC="%{__cc}"
122 export CFLAGS="%{rpmcflags}"
123 export SBCL_HOME=`pwd`/sbcl-bootstrap/lib/sbcl
124 export PATH=`pwd`/sbcl-bootstrap/bin:${PATH}
125 ./make.sh \
126         --prefix=%{_prefix} \
127         %{?bootstrap_cl}
128
129 %if %{with doc}
130 %{__make} -C doc/manual -j1
131 %endif
132
133 %install
134 rm -rf $RPM_BUILD_ROOT
135 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir},%{_infodir}} \
136         $RPM_BUILD_ROOT/etc/env.d
137
138 env -u SBCL_HOME INSTALL_ROOT=`pwd`/_install %{_buildshell} ./install.sh
139
140 %{__mv} _install/lib/sbcl $RPM_BUILD_ROOT%{_libdir}/%{name}
141 %{__mv} _install/bin/sbcl $RPM_BUILD_ROOT%{_bindir}/%{name}
142 %{__mv} _install/share/man/* $RPM_BUILD_ROOT%{_mandir}
143 %if %{with doc}
144 %{__mv} _install/share/info/*.info* $RPM_BUILD_ROOT%{_infodir}
145 %endif
146
147 echo SBCL_HOME=%{_libdir}/%{name} > $RPM_BUILD_ROOT/etc/env.d/SBCL_HOME
148
149 %clean
150 rm -rf $RPM_BUILD_ROOT
151
152 %post
153 %env_update
154
155 %postun
156 %env_update
157
158 %if %{with doc}
159 %post doc-info  -p /sbin/postshell
160 -/usr/sbin/fix-info-dir -c %{_infodir}
161
162 %postun doc-info
163 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
164 %endif
165
166 %files
167 %defattr(644,root,root,755)
168 %doc _install/share/doc/sbcl/{BUGS,COPYING,CREDITS,NEWS}
169 %attr (755,root,root) %{_bindir}/sbcl
170 %{_libdir}/%{name}
171 %{_mandir}/man1/sbcl.1*
172 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/SBCL_HOME
173
174 %if %{with doc}
175 %files doc-info
176 %defattr(644,root,root,755)
177 %{_infodir}/asdf.info*
178 %{_infodir}/sbcl.info*
179
180 %files doc-html
181 %defattr(644,root,root,755)
182 %doc _install/share/doc/sbcl/*.html
183
184 %files doc-pdf
185 %defattr(644,root,root,755)
186 %doc _install/share/doc/sbcl/*.pdf
187 %endif
This page took 0.048933 seconds and 2 git commands to generate.