2022-05-03 12:36:12 +00:00
|
|
|
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
pkgname=aws-neuron-driver
|
2022-05-13 21:16:13 +00:00
|
|
|
pkgver=2.3.3.0
|
|
|
|
pkgrel=0
|
2022-05-03 12:36:12 +00:00
|
|
|
pkgdesc="Linux Kernel module for AWS Neuron INF instances"
|
|
|
|
url="https://github.com/aws/aws-neuron-driver"
|
|
|
|
arch="x86_64"
|
|
|
|
license="GPL-2.0"
|
2022-05-13 21:16:13 +00:00
|
|
|
makedepends="bash xz linux-headers linux-virt-dev"
|
2022-05-03 12:36:12 +00:00
|
|
|
options="!check"
|
|
|
|
|
2022-05-13 21:16:13 +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-neuron-dkms/aws-neuron-dkms_"$pkgver"_amd64.deb"
|
|
|
|
|
|
|
|
unpack() {
|
|
|
|
ar -x /var/cache/distfiles/$pkgname-$pkgver.deb
|
|
|
|
tar xfJ data.tar.xz
|
|
|
|
mv usr/src/aws-neuron-$pkgver $srcdir/$pkgname-$pkgver
|
|
|
|
|
|
|
|
# What is wrong with AWS ?
|
|
|
|
find $srcdir/$pkgname-$pkgver -type d -exec chmod 755 {} \;
|
|
|
|
}
|
2022-05-03 12:36:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
build() {
|
2022-05-13 21:16:13 +00:00
|
|
|
# Hack running the build inside a container other uname -r returns host kernel
|
|
|
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
2022-05-03 12:36:12 +00:00
|
|
|
|
|
|
|
make KERNEL_SRC_DIR=/lib/modules/$KERNEL_VERSION/build
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-05-13 21:16:13 +00:00
|
|
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
2022-05-03 12:36:12 +00:00
|
|
|
|
2022-05-13 21:16:13 +00:00
|
|
|
mkdir -p "$pkgdir"/lib/modules/$KERNEL_VERSION "$pkgdir"/lib/udev/rules.d
|
|
|
|
cp neuron.ko "$pkgdir"/lib/modules/$KERNEL_VERSION
|
2022-05-03 12:36:12 +00:00
|
|
|
|
|
|
|
echo 'KERNEL=="neuron*", MODE="0666"' > "$pkgdir"/lib/udev/rules.d/90-neuron-udev.rules
|
2022-05-10 19:38:32 +00:00
|
|
|
|
2022-05-13 21:16:13 +00:00
|
|
|
depends="linux-virt=$(apk info linux-virt -d | grep description: | awk '{print $1}' | sed -e 's/linux-virt-//')"
|
2022-05-03 12:36:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="
|
2022-05-13 21:16:13 +00:00
|
|
|
1719a211d52581acdc0a3cf2279761e1748ec2008831b97b41592fc03cf732eef34ec273f8adaf8822ae4e5a080335f541632f41ffc0ac87063e49b77a243948 aws-neuron-driver-2.3.3.0.deb
|
2022-05-03 12:36:12 +00:00
|
|
|
"
|