# Contributor: Jeff Bilyk <jbilyk@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=apache-mod-auth-radius
_pkgname=mod_auth_radius
pkgver=1.6.0
pkgrel=3
pkgdesc="Apache authentication module to become RADIUS client for AAA requests"
url="http://freeradius.org/mod_auth_radius/"
arch="all"
license="Apache-1.0"
depends="apache2"
makedepends="apache2-dev freeradius-dev"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/FreeRADIUS/mod_auth_radius/archive/v$pkgver.tar.gz
	mod-auth-radius.conf"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	apxs -c mod_auth_radius.c
}

package() {
	mkdir -p "$pkgdir"/etc/apache2/conf.d
	mkdir -p "$pkgdir"/usr/lib/apache2
	/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/build-1/libtool' mod_auth_radius.la "$pkgdir"/usr/lib/apache2/
	/usr/share/build-1/libtool --mode=install install mod_auth_radius.la "$pkgdir"/usr/lib/apache2/
	install -D -m644 ../../mod-auth-radius.conf "$pkgdir"/etc/apache2/conf.d/mod-auth-radius.conf
}

sha512sums="
e128855ab198b35030b798c16538fa33c1698f0f179fccb0d160c2d2cce08f1a7b2ecfaefdc19ae7f21802d38705b7a08414444ac52041b7365a5633e5e66159  apache-mod-auth-radius-1.6.0.tar.gz
f5f8bb154e290c4f1d1af899b24ee2011d8fe88fbf31a3fd865e9dfd9927cc8e23cb022be996ec3c43ed79309814ad63efe7f3cd5b3ed670d23a572b3e561f54  mod-auth-radius.conf
"
