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

pkgname=ccl-git
epoch=1
pkgver=1.12.dev.5.3.gb5233ade
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 emaple file jfli.jar')
makedepends=('git' 'subversion')
provides=('common-lisp' 'cl-asdf' 'ccl')
conflicts=('ccl-bin' 'ccl')
_arch=64
source=("git+https://github.com/Clozure/ccl.git" https://github.com/Clozure/ccl/releases/download/v1.12-dev.5/linuxx86.tar.gz)
sha256sums=('SKIP'
            'abf692f4a05a6667306f2b885128ff4c493b6ab4c0c470e92f9d93ddfbf211df')
noextract=('linuxx86.tar.gz')

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

prepare() {
  cd ccl
  bsdtar xf "$srcdir"/linuxx86.tar.gz
}

build() {
  cd ccl/lisp-kernel/linuxx8664
  make
  cd ../..
  echo "(ccl:rebuild-ccl :full 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
}