summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0099ae8a19908382a23baf4c56830eb56e6a21e4 (plain)
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
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Rogof <rogof /at/ gmx /dot/ com>

pkgname=ccl-git
epoch=1
pkgver=1.12.11.g997de910
pkgrel=1
pkgdesc="The Clozure Common Lisp implementation"
url="http://ccl.clozure.com/"
license=('APACHE')
arch=('x86_64')
depends=('bash')
optdepends=('java-environment: for using example file jfli.jar')
makedepends=('git' 'subversion')
provides=('common-lisp' 'cl-asdf' 'ccl')
conflicts=('ccl-bin' 'ccl')
_arch=64
source=("git+https://github.com/jdz/ccl.git#branch=fix-c-headers" https://github.com/Clozure/ccl/releases/download/v1.12/linuxx86.tar.gz)
sha256sums=('SKIP'
            '7fbdb04fb1b19f0307c517aa5ee329cb4a21ecc0a43afd1b77531e4594638796')
noextract=('linuxx86.tar.gz')

pkgver() {
  cd ccl
  git describe --tags|tr - .|cut -c2-
}

prepare() {
  cd ccl
  bsdtar xf "$srcdir"/linuxx86.tar.gz
  cd lisp-kernel/linuxx8664
  make clean
  make
}

build() {
  cd ccl/lisp-kernel/linuxx8664
  make
  cd ../..
  echo "(ccl:rebuild-ccl :clean t)" | ./lx86cl$_arch --no-init --quiet --batch
}

package() {
  cd ccl
  
  # install data
 install -d "$pkgdir"/usr/lib/$pkgname
  cp -a {compiler,level-*,lib*,lisp-kernel,objc-bridge,tools,xdump,lx86cl$_arch*} \
     "$pkgdir"/usr/lib/$pkgname
  # install examples
  install -d "$pkgdir"/usr/share/$pkgname
  cp -a examples "$pkgdir"/usr/share/$pkgname
  
  # install documentation
  install -d "$pkgdir"/usr/share/doc/$pkgname
  cp -a doc/* "$pkgdir"/usr/share/doc/$pkgname
  
  # remove unwanted files
  find "$pkgdir"/usr/ -type d -name .svn -exec rm -rf '{}' +
  find "$pkgdir"/usr/lib/$pkgname -name '*.o' -exec rm -f '{}' +
  find "$pkgdir"/usr/lib/$pkgname -name '*.*fsl' -exec rm -f '{}' +

  # install frontend script
  install -d "$pkgdir"/usr/bin
  cat > "$pkgdir"/usr/bin/ccl <<EOF
#!/bin/sh
exec /usr/lib/$pkgname/lx86cl$_arch "\$@"
EOF
  chmod +x "$pkgdir"/usr/bin/ccl
}