aboutsummaryrefslogtreecommitdiffstats
path: root/main/openvpn-auth-ldap/APKBUILD
blob: d59e77aa1e5e13fc6a88f00fc875975a85d53fba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openvpn-auth-ldap
pkgver=2.0.4
pkgrel=3
pkgdesc="LDAP authentication and authorization plugin for OpenVPN 2.x"
url="https://github.com/threerings/openvpn-auth-ldap/"
arch="all"
license="BSD-3-Clause"
depends="openvpn"
makedepends="automake autoconf re2c openldap-dev openvpn-dev gcc-objc"
pkggroups="openvpn"
install="$pkgname.post-upgrade"
source="https://github.com/threerings/openvpn-auth-ldap/archive/auth-ldap-$pkgver.tar.gz
	default-config.patch
	fix-make-install.patch
	"
builddir="$srcdir/$pkgname-auth-ldap-$pkgver"

prepare() {
	default_prepare

	autoconf
	autoheader
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-openvpn=/usr \
		--with-objc-runtime=GNU \
		CFLAGS="-fPIC" \
		OBJCFLAGS="-std=gnu11"
	make
}

check() {
	make -C tests test
}

package() {
	make DESTDIR="$pkgdir" install

	install -D -m 640 -g openvpn auth-ldap.conf "$pkgdir"/etc/openvpn/auth-ldap.conf
}

sha512sums="ffa1f1617acd3f4e96d3abea7e5611d8b8406c92ff1298ac0520f2d42f188116904187d3ca8c0ae88e0bcc6449ec4c8494a18770a4635c1ee7301baaaddfa12e  auth-ldap-2.0.4.tar.gz
7d33287dde5ef338797d395f6e254d6e3116cbc274f89fc44b0de7f624d51c23c5734229279023c5b818d1ce7313f761770ee2f60c1975713feefdf03f040374  default-config.patch
e6f826558a8542e3372c23692b9006ae5978110cd599ccde4756ace6bedd0c6a249738b00ba29e7121727246e001154f7aeb3804864fbc935e0acbb17b7d2a27  fix-make-install.patch"