diff options
author | Michael Mair-Keimberger <mmk@levelnine.at> | 2023-11-01 20:04:17 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2023-11-22 19:42:14 +0100 |
commit | 1af79cecc93d314d1d97fc09d88345afa20d5527 (patch) | |
tree | 41a16bc0a2bb8e28069cff95c365e540b41ef08b /net-misc | |
parent | net-misc/htbinit: update HOMEPAGE, fix LICENSE (diff) | |
download | gentoo-1af79cecc93d314d1d97fc09d88345afa20d5527.tar.gz gentoo-1af79cecc93d314d1d97fc09d88345afa20d5527.tar.bz2 gentoo-1af79cecc93d314d1d97fc09d88345afa20d5527.zip |
net-misc/htbinit: EAPI8 bump, ebuild improvements
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/htbinit/htbinit-0.8.5-r8.ebuild | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/net-misc/htbinit/htbinit-0.8.5-r8.ebuild b/net-misc/htbinit/htbinit-0.8.5-r8.ebuild new file mode 100644 index 000000000000..438692db1db6 --- /dev/null +++ b/net-misc/htbinit/htbinit-0.8.5-r8.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info + +DESCRIPTION="Sets up Hierachical Token Bucket based traffic control (QoS) with iproute2" +HOMEPAGE="https://sourceforge.net/projects/htbinit/" +SRC_URI="mirror://sourceforge/htbinit/htb.init-v${PV}" +S="${WORKDIR}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="esfq" + +DEPEND="sys-apps/iproute2" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/htb.init-v0.8.5_tos.patch + "${FILESDIR}"/prio_rule.patch + "${FILESDIR}"/timecheck_fix.patch + "${FILESDIR}"/htb.init_find_fix.patch + "${FILESDIR}"/htb_0.8.5_ipv6.patch +) + +pkg_setup() { + local i + for i in NET_SCH_HTB NET_SCH_SFQ NET_CLS_FW NET_CLS_U32 NET_CLS_ROUTE4 ; do + CONFIG_CHECK="${CONFIG_CHECK} ~${i}" + done + + use esfq && CONFIG_CHECK="${CONFIG_CHECK} ~NET_SCH_ESFQ" + linux-info_pkg_setup +} + +src_unpack() { + cp "${DISTDIR}"/htb.init-v${PV} "${S}"/htb.init || die +} + +src_prepare() { + default + + sed -i 's|/etc/sysconfig/htb|/etc/htb|g' "${S}"/htb.init || die + + use esfq && eapply "${FILESDIR}"/htb_0.8.5_esfq.patch + + # bug #474700 + sed -i -e 's:/sbin/ip:/bin/ip:g' "${S}"/htb.init || die +} + +src_compile() { + : +} + +src_install() { + dosbin htb.init + + newinitd "${FILESDIR}"/htbinit.rc htbinit + + keepdir /etc/htb +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + elog 'Run "rc-update add htbinit default" to run htb.init at startup.' + elog 'Please, read carefully the htb.init documentation.' + elog 'New directory to store configuration is /etc/htb.' + fi +} |