net-libs/libnftnl: Sync with Gentoo

It's from Gentoo commit c839ffd09ed497f21c61c065b4de9a47ce6bb0e6.
This commit is contained in:
Flatcar Buildbot 2024-07-16 11:23:12 +00:00 committed by Mathieu Tortuyaux
parent 540db11ec0
commit 8cd324ccbe
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
2 changed files with 73 additions and 0 deletions

View File

@ -1,2 +1,4 @@
DIST libnftnl-1.2.6.tar.xz 336684 BLAKE2B a08010b26db0c7a5429f33a92ca4f17e8e158005befa5f7e3f37d60456d1b481a3f95f46c0bcec74e98ab040940f533acc279672226f0abc6ce73a26ff56718a SHA512 0c8c369eec84b0c568f0067598bece6e3be9a0fbd977e443ae3b14a5a6d842a6086ceb5426a65f8c77204709655f148c1241193f1a928f8c12154a57e3548b34
DIST libnftnl-1.2.6.tar.xz.sig 566 BLAKE2B 8ad336d0d8c693beb6335e874ad62040257e0c4527f8acb32fcc8b4889eea88ba3a42c9b2b795db6f6e3d148066ee0a9217b1e30c7e784c793458dd480ee624a SHA512 61288aa03fb80d43d09866ce549815202f682b30b283cf3119ced0fe59536d10f1c029e433651d1cb31115e977b660886a153f3361f5cafdbb0ed6da602e5b2f
DIST libnftnl-1.2.7.tar.xz 343876 BLAKE2B 42decbfdfce07c4743e7a55cf3d5d03a244ab6ac5e0f33107322ab44edcc96d360ac02f0376786656a5f7d43986499474e20a5b835f838e06d12efb017dd8eb4 SHA512 24ff3e7e97f51cb5dfda2fbd2f5e175abcec0dd58f94936022800ec356ff004a531f0915df72278b867769ba71473d407b01d52cc33a3cafb043d9a90b051f9d
DIST libnftnl-1.2.7.tar.xz.sig 566 BLAKE2B ad79b0a149d37c0ae32bcf8c64b34e02146242ce731f6860bd8d63d90e96a58e04616d543783b8edc13a0f2ca6286c16c9d8b17c34d8e8920f680a17ee70bde0 SHA512 8bf9188a287850a5057be452541871af69187c4dacde580c57be15e7f3357ab4a874745f326880260e2c2b1486e59b684db41b0d8afd57bab9d77ad62ba052bd

View File

@ -0,0 +1,71 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/netfilter.org.asc
inherit linux-info verify-sig
DESCRIPTION="Netlink API to the in-kernel nf_tables subsystem"
HOMEPAGE="https://netfilter.org/projects/nftables/"
if [[ ${PV} =~ ^[9]{4,}$ ]]; then
inherit autotools git-r3
EGIT_REPO_URI="https://git.netfilter.org/${PN}"
else
SRC_URI="
https://netfilter.org/projects/${PN}/files/${P}.tar.xz
verify-sig? ( https://netfilter.org/projects/${PN}/files/${P}.tar.xz.sig )
"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
BDEPEND+="verify-sig? ( sec-keys/openpgp-keys-netfilter )"
fi
LICENSE="GPL-2"
SLOT="0/11" # libnftnl.so version
IUSE="examples static-libs test"
RESTRICT="!test? ( test )"
RDEPEND="
>=net-libs/libmnl-1.0.4:=
"
BDEPEND+="
virtual/pkgconfig
"
DEPEND="${RDEPEND}"
pkg_setup() {
if kernel_is ge 3 13; then
CONFIG_CHECK="~NF_TABLES"
linux-info_pkg_setup
else
eerror "This package requires kernel version 3.13 or newer to work properly."
fi
}
src_prepare() {
default
[[ ${PV} =~ ^[9]{4,}$ ]] && eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_enable static-libs static)
)
econf "${myeconfargs[@]}"
}
src_install() {
default
find "${ED}" -type f -name '*.la' -delete || die
if use examples; then
find examples/ -name 'Makefile*' -delete || die "Could not rm examples"
dodoc -r examples
docompress -x /usr/share/doc/${PF}/examples
fi
}