introduced acpi_call-dkms

This commit is contained in:
AlmAck 2018-11-28 22:40:43 +01:00
parent 95db468127
commit ec394c1a01
2 changed files with 31 additions and 5 deletions

View File

@ -1,6 +1,7 @@
pkgname=acpi_call
pkgbase=acpi_call
pkgname=(acpi_call acpi_call-dkms)
pkgver=1.1.0
pkgrel=52
pkgrel=53
pkgdesc="A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)."
arch=('x86_64')
url="http://github.com/mkottman/acpi_call"
@ -8,8 +9,10 @@ license=('GPL')
depends=("linux=4.18.12")
makedepends=("linux-headers=4.18.12")
_extramodules=extramodules-CHAKRA
source=("https://github.com/mkottman/acpi_call/archive/v${pkgver}.tar.gz")
md5sums=('f69d40e130b0e5ed17ce8adb19e6dda1')
source=("https://github.com/mkottman/acpi_call/archive/v${pkgver}.tar.gz"
dkms.conf)
md5sums=('f69d40e130b0e5ed17ce8adb19e6dda1'
'dbaf20d4ac8b02490a1b3526e4536687')
prepare() {
cd $pkgbase-$pkgver
@ -26,7 +29,7 @@ build() {
make KVERSION="$(cat /usr/lib/modules/$_extramodules/version)"
}
package() {
package_acpi_call() {
cd $pkgbase-$pkgver
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 *.ko
find "$pkgdir" -name '*.ko' -exec xz {} +
@ -36,3 +39,17 @@ package() {
mkdir -p "$pkgdir/usr/share/acpi_call"
cp -t "$pkgdir/usr/share/acpi_call" -dr --no-preserve=ownership examples support
}
package_acpi_call-dkms() {
depends=(dkms)
provides=("acpi_call=$pkgver-$pkgrel")
conflicts=(acpi_call)
cd $pkgbase-$pkgver
install -Dt "$pkgdir/usr/src/$pkgbase-$pkgver" -m644 Makefile acpi_call.c ../dkms.conf
echo acpi_call | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/acpi_call.conf"
mkdir -p "$pkgdir/usr/share/acpi_call"
cp -t "$pkgdir/usr/share/acpi_call" -dr --no-preserve=ownership examples support
}

9
acpi_call/dkms.conf Normal file
View File

@ -0,0 +1,9 @@
PACKAGE_NAME="acpi_call"
PACKAGE_VERSION="#MODULE_VERSION#"
AUTOINSTALL="yes"
MAKE[0]="make KVERSION=$kernelver"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="acpi_call"
DEST_MODULE_LOCATION[0]="/kernel/drivers/acpi"