summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1ae6154342773910523241ca5a5a7dd48f22b015 (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
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=guile-git
epoch=1
_majorver=3.0
pkgver=3.0.8.r86.gf72cd7915
pkgrel=1
pkgdesc="A portable, embeddable Scheme implementation (Git snapshot)"
arch=('i686' 'x86_64' 'aarch64')
license=('GPL')
makedepends=('git' 'gperf')
optdepends=('texinfo: for using texinfo scheme sources')
depends=('gc' 'libxcrypt' 'libffi' 'libunistring' 'gmp' 'readline')
provides=("guile=$pkgver")
conflicts=('guile')
options=('!strip' '!makeflags' 'libtool')
source=("git+https://git.savannah.gnu.org/git/${pkgname%-git}.git")
url="http://www.gnu.org/software/guile/"
sha256sums=('SKIP')

pkgver() {
  cd ${pkgname%-git}
  git describe --tags | sed 's+-+.r+' | sed 's+^v++' | tr - .
}

build() {
  cd ${pkgname%-git}
  ./autogen.sh
  ./configure --prefix=/usr --program-suffix=${_majorver}
  make LDFLAGS+=" -lpthread" || true
}

package() {
  cd ${pkgname%-git}
  make DESTDIR="$pkgdir/" install
  cd "$pkgdir"/usr/share/info
  for i in guile*
  do
    mv $i guile-${_majorver}${i#guile}
  done
  sed -i "s/guile.info/guile-${_majorver}.info/g" guile-${_majorver}*
  sed -i "s/guile.texi/guile-${_majorver}.texi/g" guile-${_majorver}*
  sed -i "s/* Guile Reference: (guile)/* Guile-${_majorver} Reference: (guile-${_majorver})/g" guile-${_majorver}*
  sed -i "s/The Guile reference manual./The Guile-${_majorver} reference manual./g" guile-${_majorver}*
  mv r5rs.info r5rs-${_majorver}.info
  rm "$pkgdir"/usr/share/aclocal/guile.m4
  rm "$pkgdir"/usr/lib/libguile-3.0.so.*-gdb.scm
}