Пакет sbcl: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
%ifarch %ix86 x86_64 armh aarch64
%def_without bootstrap
%else
%def_with bootstrap
%endif

%define common_lisp_controller 0

# generate/package docs
%define docs 1

# define to enable verbose build for debugging
#define sbcl_verbose 1
%define sbcl_shell /bin/bash

Name: sbcl
Summary: Steel Bank Common Lisp
Version: 1.4.12
Release: alt3
Packager: Ilya Mashkin <oddity@altlinux.ru>
Group: Development/Lisp
License: BSD
Url: http://sbcl.sourceforge.net/
Source0: http://downloads.sourceforge.net/sourceforge/sbcl/sbcl-%version-source.tar.bz2

ExclusiveArch: armh aarch64 %ix86 x86_64 ppc sparcv9

# Pre-generated html docs
Source1: http://downloads.sourceforge.net/sourceforge/sbcl/sbcl-%version-documentation-html.tar.bz2

## x86 section
#Source10: http://downloads.sourceforge.net/sourceforge/sbcl/sbcl-1.0.15-x86-linux-binary.tar.bz2
%ifarch %ix86
%define sbcl_arch x86
#define sbcl_bootstrap_src -b 10
%endif

## x86_64 section
#Source20: http://downloads.sourceforge.net/sourceforge/sbcl/sbcl-1.2.0-x86-64-linux-binary.tar.bz2
%ifarch x86_64
%define sbcl_arch x86-64
#define sbcl_bootstrap_src -b 20
#define sbcl_bootstrap_dir sbcl-1.2.0-x86-64-linux
%endif

## ppc section
# Thanks David!
#Source30: sbcl-1.0.1-patched_el4-powerpc-linux.tar.bz2
#Source30: sbcl-1.0.1-patched-powerpc-linux.tar.bz2
%ifarch ppc
%define sbcl_arch ppc
#define sbcl_bootstrap_src -b 30
%endif

## sparc section
#Source40: http://downloads.sourceforge.net/sourceforge/sbcl/sbcl-0.9.17-sparc-linux-binary.tar.bz2
%ifarch sparcv9
%define sbcl_arch sparc
#define sbcl_bootstrap_src -b 40
%endif

#Source60: http://downloads.sourceforge.net/sourceforge/sbcl/sbcl-1.4.11-armhf-linux-binary.tar.bz2
%ifarch armh
%define sbcl_arch arm
#define sbcl_bootstrap_src -b 60
#define sbcl_bootstrap_dir sbcl-1.4.11-armhf-linux
%endif

#Source70: http://downloads.sourceforge.net/sourceforge/sbcl/sbcl-1.4.2-arm64-linux-binary.tar.bz2
%ifarch aarch64
%define sbcl_arch arm64
#define sbcl_bootstrap_src -b 70
#define sbcl_bootstrap_dir sbcl-1.4.2-arm64-linux
%endif

%if 0%{?common_lisp_controller}
BuildRequires: common-lisp-controller
Requires: common-lisp-controller
Requires(post): common-lisp-controller
Requires(preun): common-lisp-controller
Source200: sbcl.sh
Source201: sbcl.rc
Source202: sbcl-install-clc.lisp
%endif

Patch1: %name-1.0-lib_dir.patch
Patch2: sbcl-1.1.13-personality.patch
Patch3: sbcl-1.3.2-optflags.patch
Patch6: sbcl-0.9.5-verbose-build.patch
Patch7: sbcl-1.4.2-runtime.patch
Patch8: concurrency-tests-frlock.patch
## upstreamable patches
Patch50: sbcl-1.3.0-generate_version.patch




## upstream patches

%if_with bootstrap
BuildRequires: patchelf
%else
BuildRequires: sbcl
%endif

# %%check/tests
BuildRequires: ed /proc sbcl /usr/bin/tex
BuildRequires: hostinfo coreutils
%if 0%{?docs}
#Requires(post): /sbin/install-info
#Requires(preun): /sbin/install-info
# doc generation
BuildRequires: ghostscript
BuildRequires: texinfo
BuildRequires: time
%endif

%description
Steel Bank Common Lisp (SBCL) is a Open Source development environment
for Common Lisp. It includes an integrated native compiler,
interpreter, and debugger.

%prep
%setup -c -n sbcl-%version -a 1 %{?sbcl_bootstrap_src}

pushd sbcl-%version
%patch1 -p1 
%patch2 -p1 -b .personality
%patch3 -p1 -b .optflags
%{?sbcl_verbose:%patch6 -p1 -b .verbose-build}
%ifarch aarch64 x86_64
%patch7 -p1
%patch8 -p2
%endif
%patch50 -p1 -b .generate_version

%__subst "s|/usr/lib/sbcl/|%_libdir/sbcl/|" src/runtime/runtime.c

# fix permissions (some have eXecute bit set)
find . -name '*.c' | xargs chmod 644

# set version.lisp-expr
sed -i.rpmver -e "s|\"%version\"|\"%version-%release\"|" version.lisp-expr

%ifarch aarch64
f=%sbcl_bootstrap_dir/src/runtime/sbcl
[ -f ../$f ] && patchelf --set-interpreter /lib64/ld-linux-aarch64.so.1 ../$f
%endif

# make %%doc items available in parent dir to make life easier
cp -alf BUGS COPYING README CREDITS NEWS TLA TODO PRINCIPLES ..
ln -s sbcl-%version/doc ../doc
popd

%build
pushd sbcl-%version

export SBCL_HOME=%_libdir/sbcl/
export INSTALL_ROOT=%prefix


#export SBCL_HOME=%prefix/lib/sbcl
%{?sbcl_arch:export SBCL_ARCH=%sbcl_arch}
%{?sbcl_shell} \
./make.sh \
  --prefix=%prefix \
  %{?sbcl_bootstrap_dir:--xc-host="`pwd`/../%sbcl_bootstrap_dir/run-sbcl.sh"}

# docs
%if 0%{?docs}
make -C doc/manual info

# Handle pre-generated docs
tar xvjf %SOURCE1
cp -av %name-%version/doc/manual/* doc/manual/
%endif
popd

%install
pushd sbcl-%version
mkdir -p %buildroot{%_bindir,%_libdir,%_mandir}

#unset SBCL_HOME

export INSTALL_ROOT=%buildroot%prefix
export LIB_DIR=%buildroot%_libdir

%{?sbcl_shell} ./install.sh



%if 0%{?common_lisp_controller}
install -m744 -p -D %SOURCE200 %buildroot%_libdir/common-lisp/bin/sbcl.sh
install -m644 -p -D %SOURCE201 %buildroot%_sysconfdir/sbcl.rc
install -m644 -p -D %SOURCE202 %buildroot%_libdir/sbcl/install-clc.lisp
# linking ok? -- Rex
cp -p %buildroot%prefix/lib/sbcl/sbcl.core %buildroot%_libdir/sbcl/sbcl-dist.core
%endif
popd

## Unpackaged files
rm -rfv %buildroot%_docdir/sbcl
rm -fv  %buildroot%_infodir/dir
# CVS crud
find %buildroot -name CVS -type d | xargs rm -rfv
find %buildroot -name .cvsignore | xargs rm -fv
# 'test-passed' files from %%check
find %buildroot -name 'test-passed' | xargs rm -vf

%check
pushd sbcl-%version
ERROR=0
# sanity check, essential contrib modules get built/included?
CONTRIBS="sb-posix.fasl sb-bsd-sockets.fasl"
for CONTRIB in $CONTRIBS ; do
  if [ ! -f %buildroot%_libdir/sbcl/contrib/$CONTRIB ]; then
    echo "WARNING: ${CONTRIB} awol!"
    ERROR=1
    echo "ulimit -a"
    ulimit -a
  fi
done
pushd tests
# verify --version output
#test "$(source ./subr.sh; SBCL_ARGS= run_sbcl --version 2>/dev/null | cut -d' ' -f2)" = "%version-%release"
test "$(. ./subr.sh; "$SBCL_RUNTIME" --core "$SBCL_CORE" --version --version 2>/dev/null | cut -d' ' -f2)" = "%{version}-%{release}"
# still seeing Failure: threads.impure.lisp / (DEBUGGER-NO-HANG-ON-SESSION-LOCK-IF-INTERRUPTED)
time %{?sbcl_shell} ./run-tests.sh ||:
popd
exit $ERROR
popd

#mkdir -p %buildroot{%_libdir/sbcl/contrib,%_libdir/sbcl/site-systems}
#mv %buildroot%prefix/lib/sbcl/* %buildroot%_libdir/sbcl/*
#mv %buildroot%prefix/lib/contrib/* %_libdir/sbcl/contrib/
#mv %buildroot%prefix/lib/site-systems/* %_libdir/sbcl/site-systems/


%post
%if 0%{?common_lisp_controller}
/usr/sbin/register-common-lisp-implementation sbcl > /dev/null 2>&1 ||:
%endif

%preun

%if 0%{?common_lisp_controller}
/usr/sbin/unregister-common-lisp-implementation sbcl > /dev/null 2>&1 ||:
%endif


%files
%doc COPYING
%doc BUGS CREDITS NEWS PRINCIPLES README TLA TODO
%_bindir/sbcl
%dir %_libdir/sbcl/
%_libdir/sbcl/contrib/
%_libdir/sbcl/sbcl.mk
%_man1dir/sbcl.1*
%if 0%{?docs}
%doc doc/manual/sbcl.html
%doc doc/manual/asdf.html
#_infodir/asdf.info*
#_infodir/sbcl.info*
%endif
%if 0%{?common_lisp_controller}
%_libdir/common-lisp/bin/*
%_libdir/sbcl/install-clc.lisp
%_libdir/sbcl/sbcl-dist.core
%verify(not md5 size) %_libdir/sbcl/sbcl.core
%config(noreplace) %_sysconfdir/sbcl.rc
%else
%_libdir/sbcl/sbcl.core
%endif

%changelog
* Fri Dec 07 2018 Sergey Bolshakov <sbolshakov@altlinux.ru> 1.4.12-alt3
- drop bootstrap hacks for arm arches

* Fri Dec 07 2018 Sergey Bolshakov <sbolshakov@altlinux.ru> 1.4.12-alt2
- bootstrap on arm arches

* Wed Oct 03 2018 Ilya Mashkin <oddity@altlinux.ru> 1.4.12-alt1
- 1.4.12

* Thu Aug 16 2018 Ilya Mashkin <oddity@altlinux.ru> 1.4.10-alt1
- 1.4.10

* Sat Mar 31 2018 Ilya Mashkin <oddity@altlinux.ru> 1.4.6-alt1
- 1.4.6

* Mon Dec 18 2017 Ilya Mashkin <oddity@altlinux.ru> 1.4.2-alt1
- 1.4.2

* Thu Aug 24 2017 Ilya Mashkin <oddity@altlinux.ru> 1.3.20-alt1
- 1.3.20

* Wed May 31 2017 Ilya Mashkin <oddity@altlinux.ru> 1.3.18-alt1
- 1.3.18

* Tue Mar 28 2017 Ilya Mashkin <oddity@altlinux.ru> 1.3.16-alt1
- 1.3.16

* Thu Feb 02 2017 Ilya Mashkin <oddity@altlinux.ru> 1.3.14-alt1
- 1.3.14

* Fri Dec 02 2016 Ilya Mashkin <oddity@altlinux.ru> 1.3.12-alt1
- 1.3.12

* Mon Oct 03 2016 Ilya Mashkin <oddity@altlinux.ru> 1.3.10-alt1
- 1.3.10

* Fri Aug 12 2016 Ilya Mashkin <oddity@altlinux.ru> 1.3.8-alt1
- 1.3.8

* Thu Jun 02 2016 Ilya Mashkin <oddity@altlinux.ru> 1.3.6-alt1
- 1.3.6

* Wed Apr 06 2016 Ilya Mashkin <oddity@altlinux.ru> 1.3.4-alt1
- 1.3.4

* Sat Mar 19 2016 Ilya Mashkin <oddity@altlinux.ru> 1.3.3-alt1
- 1.3.3

* Tue Oct 06 2015 Ilya Mashkin <oddity@altlinux.ru> 1.2.16-alt1
- 1.2.16

* Wed Sep 09 2015 Ilya Mashkin <oddity@altlinux.ru> 1.2.15-alt1
- 1.2.15
- sync spec with FC
- docs from SF
- info removed

* Wed Oct 30 2013 Ilya Mashkin <oddity@altlinux.ru> 1.1.12-alt1
- 1.1.12

* Wed Sep 04 2013 Ilya Mashkin <oddity@altlinux.ru> 1.1.11-alt1
- 1.1.11

* Sun Apr 07 2013 Ilya Mashkin <oddity@altlinux.ru> 1.1.6-alt1
- 1.1.6

* Wed Mar 06 2013 Ilya Mashkin <oddity@altlinux.ru> 1.1.5-alt1
- 1.1.5

* Sun Dec 16 2012 Ilya Mashkin <oddity@altlinux.ru> 1.1.2-alt1
- 1.1.2

* Tue Aug 27 2012 Ilya Mashkin <oddity@altlinux.ru> 1.0.58-alt1
- 1.0.58

* Fri Apr 27 2012 Ilya Mashkin <oddity@altlinux.ru> 1.0.56-alt1
- 1.0.56

* Sat Jan 07 2012 Ilya Mashkin <oddity@altlinux.ru> 1.0.54-alt1
- 1.0.54

* Wed Sep 14 2011 Ilya Mashkin <oddity@altlinux.ru> 1.0.51-alt1
- 1.0.51

* Mon Aug 15 2011 Ilya Mashkin <oddity@altlinux.ru> 1.0.50-alt1
- 1.0.50

* Mon Jun 13 2011 Ilya Mashkin <oddity@altlinux.ru> 1.0.49-alt1
- 1.0.49

* Sat Mar 26 2011 Ilya Mashkin <oddity@altlinux.ru> 1.0.46-alt1
- 1.0.46

* Sat Feb 19 2011 Ilya Mashkin <oddity@altlinux.ru> 1.0.45-alt1
- 1.0.45

* Tue Dec 21 2010 Ilya Mashkin <oddity@altlinux.ru> 1.0.44-alt0.M51.4
- Build for 5.1

* Sun Dec 05 2010 Ilya Mashkin <oddity@altlinux.ru> 1.0.44-alt4
- fix path to sbcl

* Sat Dec 04 2010 Ilya Mashkin <oddity@altlinux.ru> 1.0.44-alt3
- fix build again
- fix build on x86_64

* Fri Dec 03 2010 Ilya Mashkin <oddity@altlinux.ru> 1.0.44-alt2
- fix build

* Thu Nov 25 2010 Ilya Mashkin <oddity@altlinux.ru> 1.0.44-alt1
- 1.0.44

* Sat Oct 30 2010 Ilya Mashkin <oddity@altlinux.ru> 1.0.42-alt1
- 1.0.42

* Sun Jul 25 2010 Ilya Mashkin <oddity@altlinux.ru> 1.0.40-alt1
- 1.0.40

* Wed Jun 02 2010 Ilya Mashkin <oddity@altlinux.ru> 1.0.39-alt1
- 1.0.39

* Sat May 08 2010 Ilya Mashkin <oddity@altlinux.ru> 1.0.38-alt1
- 1.0.38

* Mon Dec 14 2009 Ilya Mashkin <oddity@altlinux.ru> 1.0.33-alt1
- 1.0.33
- SBCL's 10th Anniversary

* Fri Oct 30 2009 Ilya Mashkin <oddity@altlinux.ru> 1.0.32-alt1
- 1.0.32

* Sun Sep 06 2009 Ilya Mashkin <oddity@altlinux.ru> 1.0.30-alt1
- 1.0.30 (Closes: 21374)
- remove unneeded Mac OS X files

* Thu Jul 23 2009 Ilya Mashkin <oddity@altlinux.ru> 1.0.29-alt1
- 1.0.29

* Tue Mar 17 2009 Ilya Mashkin <oddity@altlinux.ru> 1.0.25-alt1
- 1.0.25

* Sat Jan 10 2009 Ilya Mashkin <oddity@altlinux.ru> 1.0.24-alt1
- 1.0.24

* Sun Dec 14 2008 Ilya Mashkin <oddity@altlinux.ru> 1.0.23-alt1
- 1.0.23
- Dedicated to the 50th birthday of Lisp

* Sat Dec 15 2007 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 1.0.12-alt1
- 1.0.12

* Fri Sep 21 2007 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 1.0.9-alt1
- 1.0.9
- remove Russian description

* Fri May 04 2007 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 1.0.5-alt1
- 1.0.5

* Thu Jan 11 2007 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 1.0.1-alt1
- 1.0.1

* Sat Dec 16 2006 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 1.0-alt1
- 1.0

* Sun Oct 08 2006 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 0.9.17-alt1
- 0.9.17

* Sat Mar 18 2006 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 0.9.10-alt2
- rebuild with sbcl as compilation host

* Thu Mar 16 2006 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 0.9.10-alt1
- new version
- using clisp as cross-compilation host
- builds on x86_64

* Wed Jan 11 2006 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 0.9.8-alt2
- package /usr/lib/sbcl

* Mon Jan 09 2006 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 0.9.8-alt1
- new version

* Fri Oct 14 2005 Vadim V. Zhytnikov <vvzhy@altlinux.ru> 0.9.5-alt1
- new version

* Sat Dec 11 2004 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.17-alt1
- new varsion

* Thu Sep 23 2004 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.14-alt1
- new version

* Sun Jul 18 2004 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.9.55-alt0.1
- rebuild

* Thu Mar 25 2004 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.8-alt3
- autoreq bug fixed

* Mon Mar 22 2004 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.8-alt2
- new version

* Sun Jan 18 2004 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.6-alt4
core path fixed

* Wed Jan 14 2004 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.6-alt3
Install_root fixed

* Thu Dec 25 2003 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.6-alt2
core path bug fixed

* Wed Dec 17 2003 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.6-alt1
- New version

* Fri Aug 29 2003 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.3-alt1
- new version

* Tue Jun 24 2003 Vitaly Lugovsky <vsl@altlinux.ru> 0.8.0-alt1
- new version

* Tue Jan 07 2003 Vitaly Lugovsky <vsl@altlinux.ru> 0.7.11-alt1cvs0
- new version (with some modifications from CVS)

* Mon Dec 09 2002 Vitaly Lugovsky <vsl@altlinux.ru> 0.7.10-alt2
- spec cleanup

* Tue Dec 03 2002 Vitaly Lugovsky <vsl@altlinux.ru> 0.7.10-alt1
- new version

* Sat Oct 05 2002 Vitaly Lugovsky <vsl@altlinux.ru> 0.7.8-alt1
- 0.7.8 release

* Thu Aug 15 2002 Vitaly Lugovsky <vsl@altlinux.ru> 0.7.6-alt1
- 0.7.6 release

* Tue Jun 25 2002 Vitaly Lugovsky <vsl@altlinux.ru> 0.7.5-alt1
- 0.7.5 release

* Tue Apr 30 2002 Vitaly Lugovsky <vsl@altlinux.ru> 0.7.3-alt1
- 0.7.3 release

* Sun Jan 27 2002 Vitaly Lugovsky <warlock@skeptik.net>
- Bootstrap requirement added (rebuild)

* Sun Jan 27 2002 Vitaly Lugovsky <warlock@skeptik.net>
- First RPM release.