47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
pkgname=aws-neuron-driver
|
|
pkgver=2.3.11.0
|
|
pkgrel=0
|
|
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"
|
|
|
|
# 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 {} \;
|
|
}
|
|
|
|
|
|
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))
|
|
|
|
mkdir -p "$pkgdir"/lib/modules/$KERNEL_VERSION "$pkgdir"/lib/udev/rules.d
|
|
cp neuron.ko "$pkgdir"/lib/modules/$KERNEL_VERSION
|
|
|
|
echo 'KERNEL=="neuron*", MODE="0666"' > "$pkgdir"/lib/udev/rules.d/90-neuron-udev.rules
|
|
|
|
depends="linux-virt=$(apk info linux-virt -d | grep description: | awk '{print $1}' | sed -e 's/linux-virt-//')"
|
|
}
|
|
|
|
sha512sums='
|
|
b0a67a72eb210e37aff77fa6ec62e2affbdc6792071ae1bf4a9c772f0bc5d8c8df64b527ca015fbefe0480c15c8e310d6ea066c5a7ced24e484d1dad5e86499f aws-neuron-driver-2.3.11.0.deb
|
|
'
|