2017-06-08 16:13:16 +03:00
|
|
|
# Copyright 1999-2017 Gentoo Foundation
|
2012-11-23 17:28:10 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
2017-06-08 16:13:16 +03:00
|
|
|
EAPI=6
|
2012-11-23 17:28:10 +04:00
|
|
|
|
|
|
|
MY_PN="radiusplugin"
|
|
|
|
MY_P="${MY_PN}_v${PV}"
|
|
|
|
|
|
|
|
inherit flag-o-matic multilib toolchain-funcs
|
|
|
|
|
|
|
|
DESCRIPTION="Radiusplugin for OpenVPN"
|
|
|
|
HOMEPAGE="http://www.nongnu.org/radiusplugin/index.html"
|
|
|
|
SRC_URI="http://www.nongnu.org/radiusplugin/${MY_P}.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
|
|
|
|
# TODO: handle with optional doxygen documentation generation
|
|
|
|
#IUSE="doc"
|
|
|
|
IUSE=""
|
|
|
|
|
2017-06-08 16:13:16 +03:00
|
|
|
DEPEND="dev-libs/libgcrypt:="
|
2012-11-23 17:28:10 +04:00
|
|
|
RDEPEND="${DEPEND}
|
2017-06-08 16:13:16 +03:00
|
|
|
net-vpn/openvpn"
|
2012-11-23 17:28:10 +04:00
|
|
|
|
|
|
|
S="${WORKDIR}/${MY_PN}"
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
# Make compilation process verbose
|
|
|
|
# Respect CFLAGS, LDFLAGS and compiler
|
|
|
|
sed -i \
|
|
|
|
-e 's:@$(CC):$(CC):g' \
|
|
|
|
-e '/^CFLAGS/d' \
|
|
|
|
-e '/^LDFLAGS/d' \
|
|
|
|
Makefile || die 'sed on Makefile failed'
|
|
|
|
# needed for proper compilation
|
|
|
|
append-cflags -shared -fPIC -DPIC
|
2017-06-08 16:13:16 +03:00
|
|
|
|
|
|
|
eapply_user
|
2012-11-23 17:28:10 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
emake CC="$(tc-getCC)"
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
insinto /etc/openvpn
|
|
|
|
doins "${MY_PN}.cnf"
|
|
|
|
exeinto "/usr/$(get_libdir)/openvpn"
|
|
|
|
doexe "${MY_PN}.so"
|
|
|
|
dodoc README ToDo
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
elog "Radiusplugin is installed into '/usr/$(get_libdir)/openvpn'"
|
|
|
|
elog "Path for it should be set in your openvpn.conf"
|
|
|
|
}
|