# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=opensmtpd-table-sqlite
pkgver=1.0.1
pkgrel=0
pkgdesc="OpenSMTPD SQLite tables"
url="https://github.com/OpenSMTPD/table-sqlite"
arch="all"
license="ISC"
makedepends="
	autoconf
	automake
	sqlite-dev
	"
subpackages="$pkgname-doc"
source="https://github.com/OpenSMTPD/table-sqlite/archive/$pkgver/opensmtpd-table-sqlite-$pkgver.tar.gz"
builddir="$srcdir/table-sqlite-$pkgver"
options="!check"  # upstream does not provide tests

prepare() {
	default_prepare
	./bootstrap
}

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--sysconfdir=/etc/smtpd
	make
}

package() {
	make DESTDIR="$pkgdir" smtpdir="/usr/lib/opensmtpd" install
}

sha512sums="
dc977e0a04760ee1e1058826cbd1adb1a0b39dda1b14deae2f9eb42b297eecf21b109ff05e5bd6633e191f3e9a773b500780194f6ebb31e8baa5257eb35a19f3  opensmtpd-table-sqlite-1.0.1.tar.gz
"
