void-packages/srcpkgs/dpdk/template

80 lines
2.5 KiB
Bash
Raw Normal View History

2019-11-02 22:58:14 +00:00
# Template file for 'dpdk'
pkgname=dpdk
version=19.08
revision=1
build_style=meson
configure_args="-Denable_kmods=false -Denable_docs=true -Db_lto=false"
hostmakedepends="doxygen python3-Sphinx pkg-config elfutils"
makedepends="libnuma-devel linux-headers jansson-devel libpcap-devel zlib-devel libressl-devel libbsd-devel libelf libmnl"
depends="python-pyelftools"
short_desc="Data Plane Development Kit"
maintainer="Hans-J. Schmid <knock@myopendoor.de>"
license="BSD-3-Clause, GPL-2.0-only"
homepage="https://www.dpdk.org/"
distfiles="https://github.com/DPDK/${pkgname}/archive/v${version}.tar.gz"
checksum=1ceff1a6f4f8d5f6f62c1682097249227ac5225ccd9638e0af09f5411c681038
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
2019-11-03 21:36:01 +00:00
broken="Usage of error.h, execinfo.h and argp.h"
2019-11-02 22:58:14 +00:00
fi
case "$XBPS_TARGET_MACHINE" in
2019-11-03 21:36:01 +00:00
armv*) broken="Cannot get define of '__ARM_NEON'";;
2019-11-02 22:58:14 +00:00
esac
post_install() {
vmkdir usr/lib/modules-load.d
vlicense license/bsd-3-clause.txt
vlicense license/gpl-2.0.txt
}
dpdk-doc_package() {
short_desc+=" - documentation"
archs=noarch
pkg_install() {
vmove usr/share/doc
}
}
do_check() {
:
}
dpdk-devel_package() {
depends="${sourcepkg}>=${version}_${revision} jansson-devel zlib-devel libbsd-devel libressl-devel"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/dpdk-pdump
vmove usr/bin/dpdk-proc-info
vmove usr/bin/dpdk-test*
vmove usr/include
vmove usr/lib/*.so
vmove usr/lib/*.a
vmove usr/lib/dpdk/pmds-${version}/*.so
vmove usr/lib/pkgconfig
vmove usr/share/dpdk/examples
}
}
dpdk-dkms_package() {
short_desc+=" - DKMS kernel modules"
dkms_modules="dpdk-igb-uio $version dpdk-rte-kni $version"
depends="dkms dpdk-devel"
pkg_install() {
vmkdir usr/src/dpdk-igb-uio-${version}
vmkdir usr/src/dpdk-rte-kni-${version}
vcopy "kernel/linux/igb_uio/*" usr/src/dpdk-igb-uio-${version}
vcopy "kernel/linux/kni/*" usr/src/dpdk-rte-kni-${version}
vcopy ${FILESDIR}/dkms_igb_uio.conf usr/src/dpdk-igb-uio-${version}/dkms.conf
vcopy ${FILESDIR}/dkms_rte_kni.conf usr/src/dpdk-rte-kni-${version}/dkms.conf
sed -i -e "s/@VERSION@/${version}/" ${PKGDESTDIR}/usr/src/dpdk-igb-uio-${version}/dkms.conf
sed -i -e "s/@VERSION@/${version}/" ${PKGDESTDIR}/usr/src/dpdk-rte-kni-${version}/dkms.conf
# load modules at boot time
echo igb_uio > ${DESTDIR}/usr/lib/modules-load.d/igb_uio.conf
echo rte_kni > ${DESTDIR}/usr/lib/modules-load.d/rte_kni.conf
chmod 644 ${DESTDIR}/usr/lib/modules-load.d/igb_uio.conf
chmod 644 ${DESTDIR}/usr/lib/modules-load.d/rte_kni.conf
vmove usr/lib/modules-load.d
}
}