net-dialup/accel-ppp: new package, add 1.13.0_p20250103
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
parent
6caf883f93
commit
849ea954d5
6 changed files with 203 additions and 0 deletions
18
metadata/md5-cache/net-dialup/accel-ppp-1.13.0_p20250103
Normal file
18
metadata/md5-cache/net-dialup/accel-ppp-1.13.0_p20250103
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
BDEPEND=app-alternatives/ninja >=dev-build/cmake-3.20.5 ipoe? ( dev-util/pahole sys-apps/kmod[tools] modules-sign? ( dev-libs/openssl virtual/pkgconfig ) )
|
||||||
|
DEFINED_PHASES=compile configure install postinst prepare setup test
|
||||||
|
DEPEND=!libtomcrypt? ( dev-libs/openssl:0= ) libtomcrypt? ( dev-libs/libtomcrypt:0= ) lua? ( lua_single_target_lua5-1? ( dev-lang/lua:5.1 ) ) postgres? ( dev-db/postgresql:* ) snmp? ( net-analyzer/net-snmp ) dev-libs/libpcre valgrind? ( dev-debug/valgrind ) ipoe? ( virtual/linux-sources )
|
||||||
|
DESCRIPTION=High performance PPTP, PPPoE and L2TP server
|
||||||
|
EAPI=8
|
||||||
|
HOMEPAGE=https://sourceforge.net/projects/accel-ppp/
|
||||||
|
IDEPEND=ipoe? ( sys-apps/kmod[tools] )
|
||||||
|
INHERIT=cmake flag-o-matic linux-mod-r1 lua-single
|
||||||
|
IUSE=debug doc libtomcrypt lua postgres radius shaper snmp valgrind dist-kernel modules-compress modules-sign +strip ipoe +lua_single_target_lua5-1
|
||||||
|
KEYWORDS=~amd64 ~x86
|
||||||
|
LICENSE=GPL-2
|
||||||
|
PDEPEND=net-dialup/ppp-scripts
|
||||||
|
RDEPEND=!libtomcrypt? ( dev-libs/openssl:0= ) libtomcrypt? ( dev-libs/libtomcrypt:0= ) lua? ( lua_single_target_lua5-1? ( dev-lang/lua:5.1 ) ) postgres? ( dev-db/postgresql:* ) snmp? ( net-analyzer/net-snmp ) dev-libs/libpcre ipoe? ( sys-apps/kmod[tools] dist-kernel? ( virtual/dist-kernel:= ) )
|
||||||
|
REQUIRED_USE=lua? ( ^^ ( lua_single_target_lua5-1 ) ) valgrind? ( debug )
|
||||||
|
SLOT=0
|
||||||
|
SRC_URI=https://herbizarre.swordarmor.fr/garbage/accel-ppp-1.13.0_p20250103.tar.gz
|
||||||
|
_eclasses_=toolchain-funcs 14648d8795f7779e11e1bc7cf08b7536 multilib b2a329026f2e404e9e371097dda47f96 flag-o-matic f14aba975c94ccaa9f357a27e3b17ffe multiprocessing 1e32df7deee68372153dca65f4a7c21f ninja-utils 2df4e452cea39a9ec8fb543ce059f8d6 xdg-utils 42869b3c8d86a70ef3cf75165a395e09 cmake 10a50dfaf728b802fcfd37f8d0da9056 mount-boot-utils 2551bac1a772f4b6beacb494a750ae92 dist-kernel-utils 97700892f3bc8ee315ee55ff5297a739 edo 367e103a74bf77e6a8da7894d999fa3c linux-info ea4122ba1d8791a12b78e53f9510a2e3 linux-mod-r1 84b53048ef3f4ee4f1b3dce65d43580e lua-utils 7c89927eda6f21c4c48136247077ab37 lua-single 75fe955a36b18e199213c8739eaebdbb
|
||||||
|
_md5_=e639ebe6052eb8972a77328f844e67fc
|
1
net-dialup/accel-ppp/Manifest
Normal file
1
net-dialup/accel-ppp/Manifest
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DIST accel-ppp-1.13.0_p20250103.tar.gz 1955998 BLAKE2B e2473cd0cbe44fd70c9537f9c111d4c3e0224220d096f82d743747c7b7d250fe72a2103dfc1157950eb8b1a4a7c2ba83d9a704707019fda11df35ca0f17bc387 SHA512 1ba00541fdc9d0163c45b9546462b9953c95630eba033482ad609b918b6ed9bd9a11497f5a6915b678b028762ec2fde1ccb886f92f1ab14eaefbca3966b12591
|
109
net-dialup/accel-ppp/accel-ppp-1.13.0_p20250103.ebuild
Normal file
109
net-dialup/accel-ppp/accel-ppp-1.13.0_p20250103.ebuild
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
# Copyright 1999-2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
LUA_COMPAT=( lua5-1 )
|
||||||
|
MODULES_OPTIONAL_IUSE="ipoe"
|
||||||
|
inherit cmake flag-o-matic linux-mod-r1 lua-single
|
||||||
|
|
||||||
|
DESCRIPTION="High performance PPTP, PPPoE and L2TP server"
|
||||||
|
HOMEPAGE="https://sourceforge.net/projects/accel-ppp/"
|
||||||
|
SRC_URI="https://herbizarre.swordarmor.fr/garbage/${P}.tar.gz"
|
||||||
|
|
||||||
|
S="${WORKDIR}/${PN}-master"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE="debug doc libtomcrypt lua postgres radius shaper snmp valgrind"
|
||||||
|
|
||||||
|
RDEPEND="!libtomcrypt? ( dev-libs/openssl:0= )
|
||||||
|
libtomcrypt? ( dev-libs/libtomcrypt:0= )
|
||||||
|
lua? ( ${LUA_DEPS} )
|
||||||
|
postgres? ( dev-db/postgresql:* )
|
||||||
|
snmp? ( net-analyzer/net-snmp )
|
||||||
|
dev-libs/libpcre"
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
valgrind? ( dev-debug/valgrind )"
|
||||||
|
PDEPEND="net-dialup/ppp-scripts"
|
||||||
|
|
||||||
|
DOCS=( README )
|
||||||
|
|
||||||
|
CONFIG_CHECK="~L2TP ~PPPOE ~PPTP"
|
||||||
|
|
||||||
|
REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
|
||||||
|
valgrind? ( debug )"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
linux-mod-r1_pkg_setup
|
||||||
|
set_arch_to_kernel
|
||||||
|
use lua && lua-single_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
sed -i -e "/mkdir/d" \
|
||||||
|
-e "s: RENAME accel-ppp.conf.dist::" accel-pppd/CMakeLists.txt || die 'sed on accel-pppd/CMakeLists.txt failed'
|
||||||
|
|
||||||
|
# Do not install kernel modules like that - breaks sandbox!
|
||||||
|
sed -i -e '/modules_install/d' \
|
||||||
|
drivers/ipoe/CMakeLists.txt \
|
||||||
|
drivers/vlan_mon/CMakeLists.txt || die
|
||||||
|
|
||||||
|
# Fix version
|
||||||
|
sed -i -e "s/1.11/${PV}/" drivers/ipoe/ipoe.c || die
|
||||||
|
sed -i -e "s/1.11/${PV}/" drivers/vlan_mon/vlan_mon.c || die
|
||||||
|
|
||||||
|
# Bug #549918
|
||||||
|
append-ldflags -Wl,-z,lazy
|
||||||
|
|
||||||
|
cmake_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local libdir="$(get_libdir)"
|
||||||
|
local mycmakeargs=(
|
||||||
|
-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
|
||||||
|
-DCMAKE_INSTALL_LOCALSTATEDIR="${EPREFIX}/var"
|
||||||
|
-DLIB_SUFFIX="${libdir#lib}"
|
||||||
|
-DBUILD_IPOE_DRIVER="$(usex ipoe)"
|
||||||
|
-DBUILD_PPTP_DRIVER=no
|
||||||
|
-DBUILD_VLAN_MON_DRIVER="$(usex ipoe)"
|
||||||
|
-DCRYPTO="$(usex libtomcrypt TOMCRYPT OPENSSL)"
|
||||||
|
-DLOG_PGSQL="$(usex postgres)"
|
||||||
|
-DLUA="$(usex lua TRUE FALSE)"
|
||||||
|
-DMEMDEBUG="$(usex debug)"
|
||||||
|
-DNETSNMP="$(usex snmp)"
|
||||||
|
-DRADIUS="$(usex radius)"
|
||||||
|
-DSHAPER="$(usex shaper)"
|
||||||
|
$(use debug && echo "-DVALGRIND=$(usex valgrind)")
|
||||||
|
)
|
||||||
|
cmake_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
local modlist=( ipoe=accel-ppp:drivers/ipoe vlan_mon=accel-ppp:drivers/vlan_mon )
|
||||||
|
MODULES_MAKEARGS+=(
|
||||||
|
KDIR="${KV_OUT_DIR}"
|
||||||
|
)
|
||||||
|
linux-mod-r1_src_compile
|
||||||
|
cmake_src_compile
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
linux-mod-r1_src_install
|
||||||
|
cmake_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
|
||||||
|
|
||||||
|
keepdir /var/lib/accel-ppp
|
||||||
|
keepdir /var/log/accel-ppp
|
||||||
|
}
|
17
net-dialup/accel-ppp/files/accel-ppp.confd
Normal file
17
net-dialup/accel-ppp/files/accel-ppp.confd
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Config file for accel-pppd
|
||||||
|
|
||||||
|
# Pid file
|
||||||
|
ACCEL_PPPD_PID="/run/accel-ppp/accel-pppd.pid"
|
||||||
|
|
||||||
|
# Directory for radius attributes
|
||||||
|
RADATTR_DIR="/run/radattr"
|
||||||
|
|
||||||
|
# Daemon options
|
||||||
|
ACCEL_PPPD_OPTS="-d -c /etc/accel-ppp.conf"
|
||||||
|
|
||||||
|
# Set type of shutdown for accel-ppp daemon
|
||||||
|
# Default is 'hard' shutdown due to freezes
|
||||||
|
# when using upstream default('soft') with
|
||||||
|
# hundreds of sessions.
|
||||||
|
# Uncomment and set different mode if you wish
|
||||||
|
#SHUTDOWN_MODE="hard"
|
44
net-dialup/accel-ppp/files/accel-ppp.initd
Normal file
44
net-dialup/accel-ppp/files/accel-ppp.initd
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||||
|
|
||||||
|
extra_started_commands="reload"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
# Create directory for PID file
|
||||||
|
checkpath -d -q "$(dirname ${ACCEL_PPPD_PID})"
|
||||||
|
# Create default directory 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 ${ACCEL_PPPD_PID}
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping accel-pppd"
|
||||||
|
accel-cmd shutdown ${SHUTDOWN_MODE:-hard}
|
||||||
|
[ $? -ne 0 ] && kill -9 $(pidof accel-pppd)
|
||||||
|
PID="$(cat ${ACCEL_PPPD_PID})"
|
||||||
|
while [ -n "${PID}" -a -d "/proc/${PID}" ]; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
rm -f ${ACCEL_PPPD_PID}
|
||||||
|
eend 0
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
if [ ! -f ${ACCEL_PPPD_PID} ]; then
|
||||||
|
eerror "accel-pppd isn't running"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
ebegin "Reloading configuration"
|
||||||
|
start-stop-daemon --signal USR1 --pidfile ${ACCEL_PPPD_PID}
|
||||||
|
eend $?
|
||||||
|
}
|
14
net-dialup/accel-ppp/metadata.xml
Normal file
14
net-dialup/accel-ppp/metadata.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<!-- maintainer-needed -->
|
||||||
|
<use>
|
||||||
|
<flag name="ipoe">Build IPoE kernel module</flag>
|
||||||
|
<flag name="libtomcrypt">Support crypto algorithms through <pkg>dev-libs/libtomcrypt</pkg> instead of <pkg>dev-libs/openssl</pkg></flag>
|
||||||
|
<flag name="shaper">Support for traffic shaping</flag>
|
||||||
|
</use>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">xebd/accel-ppp</remote-id>
|
||||||
|
<remote-id type="sourceforge">accel-ppp</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>
|
Loading…
Reference in a new issue