# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=guile-git
pkgver=0.7.0
pkgrel=0
pkgdesc="Guile bindings of libgit2"
url="https://gitlab.com/guile-git/guile-git"
arch="all"
license="GPL-3.0-or-later"
depends="guile guile-bytestructures libgit2-dev"
makedepends="autoconf automake guile-dev zlib-dev texinfo"
checkdepends="openssh-server openssh-client"
subpackages="$pkgname-doc"
options="!strip" # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907061
source="https://gitlab.com/guile-git/guile-git/-/archive/v$pkgver/guile-git-v$pkgver.tar.bz2"
builddir="$srcdir/$pkgname-v$pkgver"

prepare() {
	default_prepare
	autoreconf -vfi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	# TODO: Ensure that check-abi is run before check.
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
6207464bc48de8e33fde0365c198e42c21719e5ffb27e30ab3277f88d04ccc4a2fe4964c0019333be8f047d3ddc76f1c98e6e060311ce6b2a13ac670c0663226  guile-git-v0.7.0.tar.bz2
"
