# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=talloc
pkgver=2.4.2
pkgrel=3
pkgdesc="Hierarchical pool based memory allocator with destructors"
arch=('x86_64')
license=('GPL-3.0-or-later')
url="https://talloc.samba.org/"
depends=('glibc' 'libbsd' 'libxcrypt')
makedepends=('python' 'docbook-xsl')
optdepends=('python: for python bindings')
source=(https://www.samba.org/ftp/talloc/talloc-$pkgver.tar.{gz,asc})
sha512sums=('fb91665ffbe0cce96b1359940ff3ed21330c81c5331140788a26aa94f82b50492176e6000ff54b31d1a434bb1cb53a6a2c7894153545252a1fd91bda7c05a213'
            'SKIP')

build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   ./configure --prefix=/usr \
     --sysconfdir=/etc/samba \
     --localstatedir=/var \
     --bundled-libraries=NONE \
     --builtin-libraries=replace \
     --enable-talloc-compat1
   make
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

package() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   make DESTDIR="${pkgdir}" install
}
