diff options
Diffstat (limited to 'net-dialup/accel-ppp')
-rw-r--r-- | net-dialup/accel-ppp/Manifest | 1 | ||||
-rw-r--r-- | net-dialup/accel-ppp/accel-ppp-1.8.0-r1.ebuild | 71 | ||||
-rw-r--r-- | net-dialup/accel-ppp/files/accel-ppp.confd | 10 | ||||
-rw-r--r-- | net-dialup/accel-ppp/files/accel-ppp.initd | 53 | ||||
-rw-r--r-- | net-dialup/accel-ppp/metadata.xml | 16 |
5 files changed, 151 insertions, 0 deletions
diff --git a/net-dialup/accel-ppp/Manifest b/net-dialup/accel-ppp/Manifest new file mode 100644 index 000000000000..89bbc9247957 --- /dev/null +++ b/net-dialup/accel-ppp/Manifest @@ -0,0 +1 @@ +DIST accel-ppp-1.8.0.tar.bz2 1566401 SHA256 a90becf1d8a579b55a95d927a35f6f83ce9a3ee1f6a6d67128a29b2fa4fd71b7 SHA512 d78c0ed4a3c51ae5f07c580b813694376fc42484a907d65164bb14409392365e2d8a876b16b15e55a7a7178cf9e573d42e578e6739f1fe9d62887e7316c816c0 WHIRLPOOL cfeb6807e2b8734a263ad3450dce07859e12783015d6f315e09d6868c06dc8680da55df8e06a4b5ddb3c014f8423ca0b08b877f465a2649167955b7c4790f648 diff --git a/net-dialup/accel-ppp/accel-ppp-1.8.0-r1.ebuild b/net-dialup/accel-ppp/accel-ppp-1.8.0-r1.ebuild new file mode 100644 index 000000000000..0a6c68d35a47 --- /dev/null +++ b/net-dialup/accel-ppp/accel-ppp-1.8.0-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils linux-info multilib + +DESCRIPTION="High performance PPTP, PPPoE and L2TP server" +HOMEPAGE="http://accel-ppp.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc postgres radius shaper snmp valgrind" + +RDEPEND="postgres? ( dev-db/postgresql ) + snmp? ( net-analyzer/net-snmp ) + dev-libs/libpcre + dev-libs/openssl:0" +DEPEND="${RDEPEND} + valgrind? ( dev-util/valgrind )" +PDEPEND="net-dialup/ppp-scripts" + +DOCS=( README ) +CONFIG_CHECK="~L2TP ~PPPOE ~PPTP" + +src_prepare() { + sed -i -e "/mkdir/d" \ + -e "/echo/d" \ + -e "s: RENAME accel-ppp.conf.dist::" accel-pppd/CMakeLists.txt || die 'sed on accel-pppd/CMakeLists.txt failed' + + epatch_user +} + +src_configure() { + local libdir="$(get_libdir)" + # There must be also dev-libs/tomcrypt (TOMCRYPT) as crypto alternative to OpenSSL + # IPoE driver does not build properly :-( + local mycmakeargs=( + -DLIB_PATH_SUFFIX="${libdir#lib}" + -DBUILD_PPTP_DRIVER=FALSE + -DBUILD_IPOE_DRIVER=FALSE + -DCRYPTO=OPENSSL + $(cmake-utils_use debug MEMDEBUG) + $(cmake-utils_use postgres LOG_PGSQL) + $(cmake-utils_use radius RADIUS) + $(cmake-utils_use shaper SHAPER) + $(cmake-utils_use snmp NETSNMP) + $(cmake-utils_use valgrind VALGRIND) + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + use doc && dodoc -r rfc + + if use snmp; then + insinto /usr/share/snmp/mibs + doins accel-pppd/extra/net-snmp/ACCEL-PPP-MIB.txt + fi + + newinitd "${FILESDIR}"/${PN}.initd ${PN}d + newconfd "${FILESDIR}"/${PN}.confd ${PN}d + + dodir /var/log/accel-ppp +} diff --git a/net-dialup/accel-ppp/files/accel-ppp.confd b/net-dialup/accel-ppp/files/accel-ppp.confd new file mode 100644 index 000000000000..7b95dfaf46b0 --- /dev/null +++ b/net-dialup/accel-ppp/files/accel-ppp.confd @@ -0,0 +1,10 @@ +# Config file for /etc/init.d/accel-pppd + +# Pid file +PID="/var/run/accel-ppp/accel-pppd.pid" + +# Directory for radius attributes +RADATTR_DIR="/var/run/radattr" + +# Daemon options +ACCEL_PPPD_OPTS="-d -c /etc/accel-ppp.conf" diff --git a/net-dialup/accel-ppp/files/accel-ppp.initd b/net-dialup/accel-ppp/files/accel-ppp.initd new file mode 100644 index 000000000000..d3f3891cd7a0 --- /dev/null +++ b/net-dialup/accel-ppp/files/accel-ppp.initd @@ -0,0 +1,53 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Id$ + +extra_started_commands="reload" + +depend() { + need net +} + +check_dir() { +# Check for directory existance, try to create it(if it's not exist yet) +# and throw error if it can not be done. +# Parameters: +# $1 - directory to check +# $2 - error message + if [[ ! -d $1 ]]; then + mkdir "$1" 2>/dev/null + if [[ $? != 0 ]]; then + eerror "$2" + exit 1 + fi + fi +} + +start() { + # Create directory for PID file + local piddir=$(dirname ${PID}) + check_dir "${piddir}" "Can not create directory $piddir for PID file" + # Create default directory for radius attributes + check_dir "${RADATTR_DIR}" "Can not create directory ${RADATTR_DIR} for radius attributes" + + ebegin "Starting accel-pppd" + start-stop-daemon --start --quiet --exec /usr/sbin/accel-pppd -- ${ACCEL_PPPD_OPTS} -p ${PID} + eend $? +} + +stop() { + ebegin "Stopping accel-pppd" + start-stop-daemon --stop --quiet --pidfile ${PID} + eend $? +} + +reload() { + if [ ! -f ${PID} ]; then + eerror "accel-pppd isn't running" + return 1 + fi + ebegin "Reloading configuration" + start-stop-daemon --signal USR1 --pidfile ${PID} + eend $? +} diff --git a/net-dialup/accel-ppp/metadata.xml b/net-dialup/accel-ppp/metadata.xml new file mode 100644 index 000000000000..6890878e999f --- /dev/null +++ b/net-dialup/accel-ppp/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>net-dialup</herd> + <maintainer> + <email>pinkbyte@gentoo.org</email> + <name>Sergey Popov</name> + </maintainer> + <use> + <flag name="shaper">Support for traffic shaping</flag> + <flag name="valgrind">Compile in valgrind hints</flag> + </use> + <upstream> + <remote-id type="sourceforge">accel-ppp</remote-id> + </upstream> +</pkgmetadata> |