pinkbyte-overlay/net-misc/openvpn-radiusplugin/openvpn-radiusplugin-2.1.ebuild

60 lines
1.2 KiB
Bash
Raw Normal View History

# 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: $
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=""
DEPEND="dev-libs/libgcrypt:="
2012-11-23 17:28:10 +04:00
RDEPEND="${DEPEND}
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
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"
}