void-packages/srcpkgs/libbpf/template

35 lines
1002 B
Bash

# Template file for 'libbpf'
pkgname=libbpf
version=1.2.2
revision=1
build_wrksrc="src"
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="elfutils-devel"
short_desc="Library for working with (e)BPF"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="LGPL-2.1-only, BSD-2-Clause"
homepage="https://github.com/libbpf/libbpf"
distfiles="https://github.com/libbpf/libbpf/archive/refs/tags/v${version}.tar.gz"
checksum=32b0c41eabfbbe8e0c8aea784d7495387ff9171b5a338480a8fbaceb9da8d5e5
post_install() {
vlicense ../LICENSE
vlicense ../LICENSE.BSD-2-Clause
# ugly hack until kernel-libc-headers is at version 6.1 :/
vsed -i -e 's:<linux/btf.h>:<bpf/linux/btf.h>:g' ${DESTDIR}/usr/include/bpf/btf.h
vinstall ../include/uapi/linux/btf.h 0644 usr/include/bpf/linux
}
libbpf-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
vmove usr/lib/pkgconfig
}
}