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

EAPI=5

inherit eutils toolchain-funcs

DESCRIPTION="Authentication and accounting server for terminal servers using RADIUS"
HOMEPAGE="http://www.radius.cistron.nl/"
SRC_URI="ftp://ftp.radius.cistron.nl/pub/radius/radiusd-cistron-${PV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* x86"

DEPEND="
	!net-dialup/freeradius
	!net-dialup/gnuradius"
RDEPEND="${DEPEND}"

S="${WORKDIR}/radiusd-cistron-${PV}"

src_prepare() {
	epatch "${FILESDIR}/${P}-gcc41.patch"
	sed -i -e "s:SHAREDIR/::g" raddb/dictionary || die
	mv src/checkrad.pl src/checkrad || die

	epatch_user
}

src_compile() {
	emake -C src \
	    CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
	    BINDIR=/usr/bin SBINDIR=/usr/sbin \
	    MANDIR=/usr/share/man SHAREDIR=/usr/share/radius
}

src_install() {
	insinto /etc/raddb
	doins raddb/*
	dodoc README doc/{ChangeLog,FAQ.txt,README*}
	doman doc/{*.1,*.8,*.5rad,*.8rad}

	dosbin src/{checkrad,radiusd,radrelay}
	dobin src/{radclient,radlast,radtest,radwho,radzap}

	newinitd "${FILESDIR}/cistronradius.rc" cistronradius
}