# Contributor: Nathan Rennie-Waldock <nathan.renniewaldock@gmail.com>
# Maintainer: Nathan Rennie-Waldock <nathan.renniewaldock@gmail.com>
pkgname=pwauth
pkgver=2.3.11
pkgrel=0
pkgdesc="Authenticator for mod_authnz_external and Apache"
url="https://code.google.com/p/pwauth/"
arch="all"
license="BSD-3-Clause"
depends=""
makedepends=""
install=""
subpackages="$pkgname-doc"
source="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pwauth/$pkgname-$pkgver.tar.gz
	10-config.patch
	20-fix-warnings.patch"
builddir="$srcdir/$pkgname-$pkgver"
options="suid"

build() {
	cd "$builddir"
	make || return 1

}

package() {
	cd "$builddir"
	install -Dm4755 pwauth "$pkgdir/usr/sbin/pwauth" || return 1

	local f
	for f in unixgroup INSTALL FORM_AUTH; do
		install -Dm644 "$f" \
			"$pkgdir/usr/share/doc/$pkgname/$f" || return 1
	done
}

md5sums="2b7812724653bb0d238c1e0dfd5affdf  pwauth-2.3.11.tar.gz
600659893382e312a8913bbee0b029c2  10-config.patch
5e1acececae370456b5eba73f5120ae2  20-fix-warnings.patch"
sha256sums="3c6ab789d6ec92984954b4217418781508df393639adc32514d8491d8825fa22  pwauth-2.3.11.tar.gz
beb10f416e5ae9515bdc58af15b50ed05fa93808197ee9253b8937e8feb36597  10-config.patch
ecc8bd1fc8e1525614f5d8ab7597cf19eac9e58bece07de0a5c145a16ede46cb  20-fix-warnings.patch"
sha512sums="e34542179785600262d046aa2d49f3fb3980ab5506e8108081c869617aa750adeee976ce9d3496fcb8e96150dddfc69bc240970865d6955e458152d72c1c8bc7  pwauth-2.3.11.tar.gz
8a04786d8cdf51af75fac1a0baa7a75fdb7c4cd5ef3f846a8d865f2d105013543392e11b0ba59a4ef487c6e69ac38876f892d44c1feb1c349b9674b66c1dd5b8  10-config.patch
37820302838297b73a5c2ad571f5872136cb76a18f6af88ff0a0681b4d0d030b9d94b6025c3ad1f7128114e0b369c668c30a022c4f1ce4273c698d7c75ac9e79  20-fix-warnings.patch"
