summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8fb833f66648c0941e96efb8ec43d2a2cd7d7e0b (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
# Contributor: Taylor Venable <taylor@metasyntax.net>
# Contributor: Fabian Brosda <fabi3141@gmx.de>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=gauche-git
pkgver=0.9.13.r15303
pkgrel=1
epoch=7
pkgdesc="R7RS Scheme implementation developed to be a handy script interpreter"
arch=('i686' 'x86_64')
url='http://practical-scheme.net/gauche/index.html'
license=('BSD')
# gauche only needed if this is the first build of gauche-git,
# afterwards gauche-git will provide gauche
depends=('mbedtls' 'gdbm' 'libatomic_ops' 'slib')
makedepends=('bash' 'git' 'gauche')
provides=('gauche')
conflicts=('gauche')
source=('git+https://github.com/shirok/Gauche.git')
md5sums=('SKIP')
_gitname='Gauche'

pkgver() {
  cd "$_gitname"
  _appver=$(awk -F, '/AC_INIT/ {print $2}' configure.ac|tr -d [])
  printf %s.r%s $(echo $_appver|tr - .) $(git rev-list --count HEAD)
}

build() {
  cd "$_gitname"
  LANG=C
  ./DIST gen
  CONFIG_SHELL=/bin/bash ./configure --prefix=/usr \
    --enable-multibyte=utf-8 --enable-threads=pthreads \
    --with-slib=/usr/share/slib --with-tls=mbedtls
  make

  # Make sure the catalog file for slib is created.
  # TODO: Better to use a hook to update after the installation?
  # s.a. src/Gauche/lib/Makefile.in
  make slibcat-in-place
}

package() {
  cd "$_gitname"
  make DESTDIR="$pkgdir" install-pkg install-doc
  install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}