void-packages/srcpkgs/dpdk/template
Nathan Owens ecdd71e339 dpdk: umark broken on armv7 and explicitly set archs and machine
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
2019-12-18 13:34:36 +01:00

81 lines
2.6 KiB
Bash

# Template file for 'dpdk'
pkgname=dpdk
version=19.08
revision=2
# no musl - uses error.h, execinfo.h and argp.h
archs="x86_64 aarch64 ppc64le i686 armv7l"
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
case "${XBPS_TARGET_MACHINE}" in
armv7l*) configure_args+=" -Dmachine=armv7-a";;
aarch64*) configure_args+=" -Dmachine=armv8-a";;
ppc64le*) configure_args+=" -Dmachine=power8";;
*) configure_args+=" -Dmachine=default"
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
}
}