# Contributor: Benoit Masson <yahoo@perenite.com>
# Maintainer: Benoit Masson <yahoo@perenite.com>
pkgname=pam_sqlite3
pkgver=1.0.2
pkgrel=0
pkgdesc="pam_sqlite3"
url="https://github.com/HormyAJP/pam_sqlite3"
arch="all"
license="GPL-3.0"
depends="linux-pam"
makedepends="linux-pam-dev sqlite-dev bsd-compat-headers"
install=""
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/HormyAJP/pam_sqlite3/archive/v1.0.2.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
options="!check"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var
	make
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir/lib/security/"
#	make DESTDIR="$pkgdir" install
	install -c -m 755 -o root pam_sqlite3.so $pkgdir/lib/security/
}

sha512sums="c6925adeae0f22abef20b02404a64144990d604a77fea16d100174b7a68617662ad59eba466aa33d40001e07a24ec1579cc2b59a5fcd5fb5570f658ac1a2be5e  pam_sqlite3-1.0.2.tar.gz"
