mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
37 lines
1.9 KiB
Bash
37 lines
1.9 KiB
Bash
# Maintainer: iDigitalFlame <idf@idfla.me>
|
|
pkgname="amzn-ena-aarch64-dkms"
|
|
pkgver="2.7.4"
|
|
pkgrel="2"
|
|
pkgdesc="Linux kernel driver for Amazon's Elastic Network Adapter (ENA)"
|
|
arch=("aarch64")
|
|
url="https://github.com/amzn/amzn-drivers"
|
|
license=("GPL")
|
|
depends=("git" "dkms" "curl" "linux-aarch64-headers")
|
|
install="amzn-drivers.install"
|
|
source=("git+https://github.com/amzn/amzn-drivers.git"
|
|
"https://github.com/amzn/amzn-drivers/files/9392177/0001-fix-bpf_warn_invalid_xdp_action-compilation-error.patch.txt")
|
|
sha256sums=("SKIP"
|
|
"SKIP")
|
|
buildarch=8
|
|
|
|
build() {
|
|
cd "$srcdir/amzn-drivers"
|
|
# Have to do this so the "am" command completes
|
|
git config --local user.email "you@example.com"
|
|
git config --local user.name "Your Name"
|
|
git am "$srcdir/0001-fix-bpf_warn_invalid_xdp_action-compilation-error.patch.txt"
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "${pkgdir}/usr/src" 2> /dev/null
|
|
cp -R "${srcdir}/amzn-drivers/kernel/linux" "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}"
|
|
printf 'PACKAGE_NAME="ena"\n' > "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}/dkms.conf"
|
|
printf 'PACKAGE_VERSION='\"${pkgver}\"'\n' >> "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}/dkms.conf"
|
|
printf 'CLEAN="make -C ena clean"\n' >> "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}/dkms.conf"
|
|
printf 'MAKE="make -C ena/ BUILD_KERNEL=$kernelver"\n' >> "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}/dkms.conf"
|
|
printf 'BUILT_MODULE_NAME[0]="ena"\n' >> "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}/dkms.conf"
|
|
printf 'BUILT_MODULE_LOCATION="ena"\n' >> "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}/dkms.conf"
|
|
printf 'DEST_MODULE_LOCATION[0]="/updates"\n'>> "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}/dkms.conf"
|
|
printf 'DEST_MODULE_NAME[0]="ena"\n' >> "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}/dkms.conf"
|
|
printf 'AUTOINSTALL="yes"\n' >> "${pkgdir}/usr/src/amzn-drivers-${pkgver}-${pkgrel}/dkms.conf"
|
|
}
|