# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=postgresql-login_hook
_projname=login_hook
pkgver=1.5
pkgrel=0
pkgdesc="PostgreSQL database extension to mimic a logon trigger"
url="https://github.com/splendiddata/login_hook"
arch="all"
license="GPL-3.0-or-later"
makedepends="postgresql-dev"
subpackages="$pkgname-doc"
install="$pkgname.post-install"
source="https://github.com/splendiddata/login_hook/archive/version_$pkgver/postgresql-login_hook-$pkgver.tar.gz"
builddir="$srcdir/$_projname-version_$pkgver"
options="!check"  # XXX: tests require running PostgreSQL

build() {
	make
}

package() {
	depends="postgresql$(pg_config --major-version)"

	make DESTDIR="$pkgdir" install
}

sha512sums="
13d4be1ebccc990779498a987668ea5f919bc80aefaf7a3a3f12e7166a82c1237e90e3544e3ddef674a9c5ac503bb2ff595e71101b6317d1671614783221f5b4  postgresql-login_hook-1.5.tar.gz
"
