dev-db/redis: Merge remote-tracking branch 'github/pr/13619'
[gentoo.git] / net-dialup / cistronradius / cistronradius-1.6.8-r2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit eutils toolchain-funcs
7
8 DESCRIPTION="Authentication and accounting server for terminal servers using RADIUS"
9 HOMEPAGE="http://www.radius.cistron.nl/"
10 SRC_URI="ftp://ftp.radius.cistron.nl/pub/radius/radiusd-cistron-${PV}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="-* x86"
15
16 DEPEND="
17         !net-dialup/freeradius
18         !net-dialup/gnuradius"
19 RDEPEND="${DEPEND}"
20
21 S="${WORKDIR}/radiusd-cistron-${PV}"
22
23 src_prepare() {
24         epatch "${FILESDIR}/${P}-gcc41.patch"
25         sed -i -e "s:SHAREDIR/::g" raddb/dictionary || die
26         mv src/checkrad.pl src/checkrad || die
27
28         epatch_user
29 }
30
31 src_compile() {
32         emake -C src \
33             CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
34             BINDIR=/usr/bin SBINDIR=/usr/sbin \
35             MANDIR=/usr/share/man SHAREDIR=/usr/share/radius
36 }
37
38 src_install() {
39         insinto /etc/raddb
40         doins raddb/*
41         dodoc README doc/{ChangeLog,FAQ.txt,README*}
42         doman doc/{*.1,*.8,*.5rad,*.8rad}
43
44         dosbin src/{checkrad,radiusd,radrelay}
45         dobin src/{radclient,radlast,radtest,radwho,radzap}
46
47         newinitd "${FILESDIR}/cistronradius.rc" cistronradius
48 }