summaryrefslogtreecommitdiff
blob: 9515d16b55b9980ce84d811069fe680daca1db4d (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit eutils autotools flag-o-matic

DESCRIPTION="LDAP authentication and authorization plugin for OpenVPN 2.x"
HOMEPAGE="https://github.com/threerings/openvpn-auth-ldap"
SRC_URI="https://dev.gentoo.org/~ercpe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE=""

RDEPEND="net-misc/openvpn
	net-nds/openldap"
DEPEND="dev-util/re2c
	sys-devel/gcc[objc]
	${RDEPEND}"

S="${WORKDIR}/${P}"

src_prepare() {
	sed \
		-e '/test/d' \
		-i Makefile.in || die
	epatch \
		"${FILESDIR}"/${PV}-objc.patch \
		"${FILESDIR}"/${PV}-gentoo.patch
	eautoreconf
}

src_configure() {
	econf \
		--with-openvpn="${EPREFIX}/usr/include" \
		--with-openldap="${EPREFIX}/usr/include" \
		--with-objc-runtime=GNU
}

src_compile() {
	emake -C tools
	emake -C src TRConfigParser.h
	default
}

src_install() {
	default
	dodoc auth-ldap.conf
}