summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2016-03-23 13:31:25 +0300
committerSergey Popov <pinkbyte@gentoo.org>2016-03-23 13:31:25 +0300
commit81452b25d5c94c5da502af040d7b546dbc61dfdc (patch)
tree594d49a9d67c391751a85c35bede1284486cb4d2 /net-dialup
parentdev-libs/libressl: remove older versions (diff)
downloadgentoo-81452b25d5c94c5da502af040d7b546dbc61dfdc.tar.gz
gentoo-81452b25d5c94c5da502af040d7b546dbc61dfdc.tar.bz2
gentoo-81452b25d5c94c5da502af040d7b546dbc61dfdc.zip
net-dialup/accel-ppp: version bump to 1.10.1
Port to EAPI 6, simplify init script, unify variable names in conf.d file Gentoo-Bug: 574414 Package-Manager: portage-2.2.28
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/accel-ppp/Manifest1
-rw-r--r--net-dialup/accel-ppp/accel-ppp-1.10.1.ebuild85
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp.confd6
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp.initd34
4 files changed, 99 insertions, 27 deletions
diff --git a/net-dialup/accel-ppp/Manifest b/net-dialup/accel-ppp/Manifest
index d1570a79736b..57b222e5cd17 100644
--- a/net-dialup/accel-ppp/Manifest
+++ b/net-dialup/accel-ppp/Manifest
@@ -1,2 +1,3 @@
DIST accel-ppp-1.10.0.tar.bz2 1585702 SHA256 c990cc195e286d3c0f8063881489608e14f3f826d25ca4c0a4812c261fd9ef14 SHA512 140ff3cf9fb684624c1419946010701d902125ba02a1e931fd5a0083d706ffd32a88d491400e82661a17bd4aacfa07ad620acea0cf4f49816c1060ae184f1084 WHIRLPOOL 749b821e1fc3189f4e2a6979e3ee6e00890a3b72311502a42142f75d5f5afe7c913d2ac7b7bcff39de2b4e3c451c783d42a04be72fe37bec8803f8159845f4e2
+DIST accel-ppp-1.10.1.tar.bz2 1587117 SHA256 2333897563925d719b1b5e6fd05238fe769b967a9bac73d3b1daa1b8ff274b7d SHA512 43dc01992a8298970911d202736af0dcd3b46744d18ecce5d4987bab8d312cfb75d5a72a6f5c1b91ad7943c2c66371063402688cce57106db116b407205f142b WHIRLPOOL 0ce66a3a0daf6f4902baf7bf8ace545c1a2e8e9105bb62dc7dad96d3da131a215da17d6e722488fc9388acfb4a7f028bf9904e62c8c7a43fa7d2cb3aa9a7ca81
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.10.1.ebuild b/net-dialup/accel-ppp/accel-ppp-1.10.1.ebuild
new file mode 100644
index 000000000000..4ea714a5a734
--- /dev/null
+++ b/net-dialup/accel-ppp/accel-ppp-1.10.1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit cmake-utils linux-info linux-mod
+
+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 ipoe 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"
+
+REQUIRED_USE="valgrind? ( debug )"
+
+pkg_setup() {
+ if use ipoe; then
+ linux-mod_pkg_setup
+ set_arch_to_kernel
+ else
+ linux-info_pkg_setup
+ fi
+}
+
+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'
+
+ eapply_user
+}
+
+src_configure() {
+ local libdir="$(get_libdir)"
+ # There must be also dev-libs/tomcrypt (TOMCRYPT) as crypto alternative to OpenSSL
+ local mycmakeargs=(
+ -DLIB_PATH_SUFFIX="${libdir#lib}"
+ -DBUILD_IPOE_DRIVER="$(usex ipoe)"
+ -DBUILD_PPTP_DRIVER=no
+ -DCRYPTO=OPENSSL
+ -DLOG_PGSQL="$(usex postgres)"
+ -DMEMDEBUG="$(usex debug)"
+ -DNETSNMP="$(usex snmp)"
+ -DRADIUS="$(usex radius)"
+ -DSHAPER="$(usex shaper)"
+ -DVALGRIND="$(usex valgrind)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+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
index 7b95dfaf46b0..41073c6529c6 100644
--- a/net-dialup/accel-ppp/files/accel-ppp.confd
+++ b/net-dialup/accel-ppp/files/accel-ppp.confd
@@ -1,10 +1,10 @@
-# Config file for /etc/init.d/accel-pppd
+# Config file for accel-pppd
# Pid file
-PID="/var/run/accel-ppp/accel-pppd.pid"
+ACCEL_PPPD_PID="/run/accel-ppp/accel-pppd.pid"
# Directory for radius attributes
-RADATTR_DIR="/var/run/radattr"
+RADATTR_DIR="/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
index d3f3891cd7a0..fd9cbad07caa 100644
--- a/net-dialup/accel-ppp/files/accel-ppp.initd
+++ b/net-dialup/accel-ppp/files/accel-ppp.initd
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Id$
@@ -9,45 +9,31 @@ 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() {
+start_pre() {
# Create directory for PID file
- local piddir=$(dirname ${PID})
- check_dir "${piddir}" "Can not create directory $piddir for PID file"
+ checkpath -d -q "$(dirname ${ACCEL_PPPD_PID})"
# Create default directory for radius attributes
- check_dir "${RADATTR_DIR}" "Can not create directory ${RADATTR_DIR} for radius attributes"
+ checkpath -d -q "${RADATTR_DIR}"
+}
+start() {
ebegin "Starting accel-pppd"
- start-stop-daemon --start --quiet --exec /usr/sbin/accel-pppd -- ${ACCEL_PPPD_OPTS} -p ${PID}
+ start-stop-daemon --start --quiet --exec /usr/sbin/accel-pppd -- ${ACCEL_PPPD_OPTS} -p ${ACCEL_PPPD_PID}
eend $?
}
stop() {
ebegin "Stopping accel-pppd"
- start-stop-daemon --stop --quiet --pidfile ${PID}
+ start-stop-daemon --stop --quiet --pidfile ${ACCEL_PPPD_PID}
eend $?
}
reload() {
- if [ ! -f ${PID} ]; then
+ if [ ! -f ${ACCEL_PPPD_PID} ]; then
eerror "accel-pppd isn't running"
return 1
fi
ebegin "Reloading configuration"
- start-stop-daemon --signal USR1 --pidfile ${PID}
+ start-stop-daemon --signal USR1 --pidfile ${ACCEL_PPPD_PID}
eend $?
}