alpine-overlay/kubezero/aws-neuron-driver/APKBUILD

47 lines
1.8 KiB
Plaintext
Raw Normal View History

2022-07-12 11:15:51 +00:00
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
pkgname=aws-neuron-driver
2023-07-04 15:10:30 +00:00
pkgver=2.10.11.0
pkgrel=0
2022-07-12 11:15:51 +00:00
pkgdesc="Linux Kernel module for AWS Neuron INF instances"
url="https://awsdocs-neuron.readthedocs-hosted.com/en/latest/release-notes/index.html#"
arch="x86_64"
license="GPL-2.0"
makedepends="bash xz linux-headers linux-virt-dev"
options="!check"
# https://awsdocs-neuron.readthedocs-hosted.com/en/latest/release-notes/neuron-driver.html#neuron-driver-release-notes
2022-07-12 11:15:51 +00:00
# apt-get download --print-uris aws-neuron-dkms | cut -d' ' -f1
source="$pkgname-$pkgver.deb::https://apt.repos.neuron.amazonaws.com/pool/main/a/aws-neuronx-dkms/aws-neuronx-dkms_"$pkgver"_amd64.deb"
2022-07-12 11:15:51 +00:00
unpack() {
ar -x "$srcdir/$pkgname-$pkgver.deb" && find . -type d -exec chmod 755 {} \; && tar xfJo data.tar.xz
mv usr/src/aws-neuronx-"$pkgver" "$srcdir/$pkgname-$pkgver"
rm -rf usr data.tar.xz control.tar.xz debian-binary
2022-07-12 11:15:51 +00:00
# What is wrong with AWS ?
find $srcdir/$pkgname-$pkgver -type d -exec chmod 755 {} \;
}
build() {
# Hack running the build inside a container other uname -r returns host kernel
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
make KERNEL_SRC_DIR=/lib/modules/$KERNEL_VERSION/build
}
package() {
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
depends="linux-virt~$(echo $KERNEL_VERSION | sed -e 's/-.*$//')"
2022-07-12 11:15:51 +00:00
mkdir -p "$pkgdir"/lib/modules/$KERNEL_VERSION/kernel "$pkgdir"/lib/udev/rules.d
gzip -9 -c neuron.ko > "$pkgdir"/lib/modules/$KERNEL_VERSION/kernel/neuron.ko.gz
2022-07-12 11:15:51 +00:00
echo 'KERNEL=="neuron*", MODE="0666"' > "$pkgdir"/lib/udev/rules.d/90-neuron-udev.rules
}
sha512sums="
2023-07-04 15:10:30 +00:00
0fdbc1ebd12044be77714affd427c198f72ce04f0236a100e49642fbdb143a4e6c1156f4555ac0fe8baa6bea09420408bbb1cfd2857f29d54e615b22193afd0d aws-neuron-driver-2.10.11.0.deb
"