summaryrefslogtreecommitdiff
path: root/net-analyzer/netselect
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
commit5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch)
tree66e860a5099bcad013f1cf667255dc372a7c11b3 /net-analyzer/netselect
parent7218e1b46bceac05841e90472501742d905fb3fc (diff)
gentoo resync : 20.03.2021
Diffstat (limited to 'net-analyzer/netselect')
-rw-r--r--net-analyzer/netselect/Manifest3
-rw-r--r--net-analyzer/netselect/netselect-0.4-r2.ebuild56
-rw-r--r--net-analyzer/netselect/netselect-9999.ebuild38
3 files changed, 80 insertions, 17 deletions
diff --git a/net-analyzer/netselect/Manifest b/net-analyzer/netselect/Manifest
index e8ddf803d59f..52aec3b3d6f0 100644
--- a/net-analyzer/netselect/Manifest
+++ b/net-analyzer/netselect/Manifest
@@ -3,5 +3,6 @@ AUX netselect-0.4-flags.patch 172 BLAKE2B 17acc10b64404c9d8525147f5ca526f661a2b2
DIST netselect-0.4-ipv6.patch.xz 18272 BLAKE2B 6197057085e892c156a9fb3a82ac0030a2ff1b4276dde48405de2d2bcfdcef066c4f3eeff174f766af23d2807085f97e459dbffc87b2a2950a472e7964f2e3fc SHA512 422b54df5be45379fe7d6776b6e653a8e49df6fb77421527f2eb6c687597f36cccc7ab5cc5206e9823c318f6facd84fb4e8c0dbffbf9641cee593401cb73abea
DIST netselect-0.4.tar.gz 22095 BLAKE2B 1dd83c4dcd38ab7b987ead76f4e7e727980bbad91b59c56948e13540307e685984cc11ea94292d38959c8253f1f6ec2e6e6e044302f26b09153717d6e29e96be SHA512 eee9639122b7cc89218c610794d090582aecb3df138bcef41472c8d40c0f7e998b2c4b04aace13795fda5c710ee28cc2c0784a680ad6d1aa6a14eb441a408bfa
EBUILD netselect-0.4-r1.ebuild 958 BLAKE2B de3233fbf07f2fb59d4361deb7fe16bb6355817f509b765a68a3e2c626b2ba66ee7a798e6fd4d31d044f04854888af9ca17e46dad1b6f2d0eeadf1375accf2a0 SHA512 54d574ba626ef2f7c23348d58ba8863cd504854e06a0bd230dee0de2983a0b93f07f7738e2428859cf2332a787645f09e87241861be68dc07191b2c0231165cd
-EBUILD netselect-9999.ebuild 899 BLAKE2B 3ba6abea554f5c72ebab839ae1649c326a6bb76483dad1ca9f4731637a77fb75ff71746e0560cbb0140921f90e1aeecc85b9f1b3ba18aba85e68fb7a5cf7342c SHA512 3eb340cc66a031be74b83bb77d78fd80f77eadb8c8dd3394987e8651a70f78d008d497a78ed3e7725b88deb08b301df705e06e5fea3a90d3ca8d38bfd403e66f
+EBUILD netselect-0.4-r2.ebuild 1204 BLAKE2B 996310fb895d32a007b1008c84953a68a281f424685865d5996fbae678a0950b87ef957c191d139e80b59c9cd78d5bacca15fbd93404287b07f060f298f3fe40 SHA512 06bedc8708ced787284f8f092d982b2c7c9d1683069307df73867d2ba868f27222f1fd1bbe7d55d965145a813a530eb8beb6c32eea00ba957232a558e57c9ca6
+EBUILD netselect-9999.ebuild 1144 BLAKE2B 56afffb99197144cfa811f79b15bcff52992ea6bb539e4eb51a7fc45330f5662476c9ddb14db54e2ebe868ea32ddf0c319eb8b6514dce089b0ef23f6586f32f3 SHA512 5478562b06da2080c5aebecaa267318afa19abd5b2dae30db2ccff0d329e8e0ecf55d548d1b4eb878cd35592f715154f6d958cf080bbfa91f9fb31d9c44e0bb9
MISC metadata.xml 276 BLAKE2B e21811549278e73aa9a14acfe242fd022106a39ac1300caa00615772d7f54d08a433052659a271f9ac0d453c7776fc2b9e8d86e6d3f637817c214174dde52cb2 SHA512 f0e6c6bc89659e01e157d9bf30d0a2f3fd2d71bc26c8d12489c4a44fc5237159946e25b46e7295ab4676aea63559194977a0b1e76aced31d81cf6387dd0f4250
diff --git a/net-analyzer/netselect/netselect-0.4-r2.ebuild b/net-analyzer/netselect/netselect-0.4-r2.ebuild
new file mode 100644
index 000000000000..c0eb61494801
--- /dev/null
+++ b/net-analyzer/netselect/netselect-0.4-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit fcaps toolchain-funcs
+
+DESCRIPTION="Ultrafast implementation of ping"
+HOMEPAGE="http://apenwarr.ca/netselect/"
+SRC_URI="
+ https://github.com/apenwarr/${PN}/archive/${P}.tar.gz
+ ipv6? ( https://dev.gentoo.org/~jer/${P}-ipv6.patch.xz )
+"
+S="${WORKDIR}/${PN}-${P}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="ipv6"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.4-bsd.patch
+ "${FILESDIR}"/${PN}-0.4-flags.patch
+)
+
+DOCS=( HISTORY README )
+
+FILECAPS=( -g wheel cap_net_raw usr/bin/netselect )
+
+src_prepare() {
+ use ipv6 && eapply "${WORKDIR}"/${PN}-0.4-ipv6.patch
+
+ default
+
+ # Don't warn about "root privileges required" when running as
+ # an unprivileged user with filecaps
+ if ! use prefix && use filecaps; then
+ sed -i -e '/if (geteuid () != 0)/,+2d' "${S}"/netselect.c || die
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDFLAGS="${CFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dobin netselect
+
+ einstalldocs
+
+ doman netselect.1
+}
+
+pkg_postinst() {
+ ! use prefix && fcaps_pkg_postinst
+}
diff --git a/net-analyzer/netselect/netselect-9999.ebuild b/net-analyzer/netselect/netselect-9999.ebuild
index c41a3b0d656e..7fee270c477b 100644
--- a/net-analyzer/netselect/netselect-9999.ebuild
+++ b/net-analyzer/netselect/netselect-9999.ebuild
@@ -1,21 +1,18 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit git-r3 toolchain-funcs
+
+inherit fcaps git-r3 toolchain-funcs
DESCRIPTION="Ultrafast implementation of ping"
HOMEPAGE="http://apenwarr.ca/netselect/"
-EGIT_REPO_URI="
- https://github.com/apenwarr/${PN}
-"
-SRC_URI="
- ipv6? ( https://dev.gentoo.org/~jer/${PN}-0.4-ipv6.patch.xz )
-"
+EGIT_REPO_URI="https://github.com/apenwarr/${PN}"
+SRC_URI="ipv6? ( https://dev.gentoo.org/~jer/${PN}-0.4-ipv6.patch.xz )"
+S="${WORKDIR}/${PN}-${P}"
LICENSE="BSD"
SLOT="0"
-KEYWORDS=""
IUSE="ipv6"
PATCHES=(
@@ -23,15 +20,25 @@ PATCHES=(
"${FILESDIR}"/${PN}-0.4-flags.patch
)
+DOCS=( HISTORY README )
+
+FILECAPS=( -g wheel cap_net_raw usr/bin/netselect )
+
src_unpack() {
use ipv6 && unpack ${A}
git-r3_src_unpack
}
src_prepare() {
- use ipv6 && PATCHES+=( "${WORKDIR}"/${PN}-0.4-ipv6.patch )
+ use ipv6 && eapply "${WORKDIR}"/${PN}-0.4-ipv6.patch
default
+
+ # Don't warn about "root privileges required" when running as
+ # an unprivileged user with filecaps
+ if ! use prefix && use filecaps; then
+ sed -i -e '/if (geteuid () != 0)/,+2d' "${S}"/netselect.c || die
+ fi
}
src_compile() {
@@ -41,12 +48,11 @@ src_compile() {
src_install() {
dobin netselect
- if ! use prefix ; then
- fowners root:wheel /usr/bin/netselect
- fperms 4711 /usr/bin/netselect
- fi
-
- dodoc HISTORY README
+ einstalldocs
doman netselect.1
}
+
+pkg_postinst() {
+ ! use prefix && fcaps_pkg_postinst
+}