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

EAPI=5

inherit eutils autotools flag-o-matic

DESCRIPTION="LDAP authentication and authorization plugin for OpenVPN 2.x"
HOMEPAGE="https://code.google.com/p/openvpn-auth-ldap/"
SRC_URI="http://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
}