archrelease: copy trunk to extra-x86_64
[arch-packages.git] / sbcl / trunk / PKGBUILD
blob944d82a2f03ff67041b749ff6f05aa30c3087d40
1 # Contributor: John Proctor <jproctor@prium.net>
2 # Contributor: Daniel White <daniel@whitehouse.id.au>
3 # Maintainer: Juergen Hoetzel <juergen@archlinux.org>
4 # Contributor: Leslie Polzer (skypher)
6 pkgname=sbcl
7 pkgver=2.3.3
8 pkgrel=1
9 pkgdesc="Steel Bank Common Lisp"
10 url="http://www.sbcl.org/"
11 arch=('x86_64')
12 license=('custom')
13 depends=('zlib')
14 provides=('common-lisp' 'cl-asdf')
15 makedepends=('sbcl')
16 source=("https://downloads.sourceforge.net/project/sbcl/sbcl/$pkgver/$pkgname-$pkgver-source.tar.bz2"
17   "arch-fixes.lisp")
18 sha256sums=('52e9a16f79a9bb4601ac09a6c76dfb90a7d643c9acff736b4293b2699f0150bf'
19             'b5a6468dcbc1012cae2c3cda155762a37b6d96ef89bba4f723315063b0b5e7ce')
22 build() {
23   cd "$srcdir/$pkgname-$pkgver"
24   export CFLAGS+=" -D_GNU_SOURCE -fno-omit-frame-pointer -DSBCL_HOME=/usr/lib/sbcl"
25   export GNUMAKE="make"
27   # build system uses LINKFLAGS and OS_LIBS to build LDFLAGS
28   export LINKFLAGS="$LDFLAGS"
29   unset LDFLAGS
30   unset MAKEFLAGS
31   sh make.sh sbcl --prefix=/usr --fancy
32   make -C doc/manual info
35 package() {
36   cd "$srcdir/$pkgname-$pkgver"
38   # cannot have both SBCL_HOME and INSTALL_ROOT
39   SBCL_HOME="" INSTALL_ROOT="$pkgdir/usr" sh install.sh
41   src/runtime/sbcl --core output/sbcl.core --script "${srcdir}/arch-fixes.lisp"
42   mv sbcl-new.core "${pkgdir}/usr/lib/sbcl/sbcl.core"
44   # sources
45   mkdir -p "$pkgdir/usr/share/sbcl-source"
46   cp -R -t "$pkgdir/usr/share/sbcl-source" "$srcdir/$pkgname-$pkgver/"{src,contrib}
48   # license
49   install -D -m644 "$srcdir/$pkgname-$pkgver/COPYING" \
50                    "$pkgdir/usr/share/licenses/$pkgname/license.txt"
52   # drop unwanted files
53   find "$pkgdir" \( -name Makefile -o -name .cvsignore \) -delete
54   find "$pkgdir/usr/share/sbcl-source" -type f \
55     \( -name \*.fasl -o -name \*.o -o -name \*.log -o -name \*.so -o -name a.out \) -delete
57   rm "$pkgdir/usr/share/sbcl-source/src/runtime/sbcl"