mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 07:44:38 +08:00
6f2af17bca
removed unused tiacx-lts
39 lines
1.2 KiB
Bash
39 lines
1.2 KiB
Bash
|
|
pkgname=acpi_call-lts
|
|
_pkgname=acpi_call
|
|
pkgver=1.1.0
|
|
pkgrel=11
|
|
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'
|
|
license=('GPL')
|
|
depends=("linux-lts=4.4.150")
|
|
makedepends=("linux-lts-headers=4.4.150")
|
|
provides=("${pkgname%-*}")
|
|
_extramodules=extramodules-CHAKRA-LTS
|
|
source=("https://github.com/mkottman/acpi_call/archive/v${pkgver}.tar.gz")
|
|
md5sums=('f69d40e130b0e5ed17ce8adb19e6dda1')
|
|
|
|
prepare() {
|
|
cd ${pkgname%-*}-${pkgver}
|
|
|
|
# Fix build with Linux >= 3.17
|
|
sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname%-*}-${pkgver}
|
|
make KVERSION="$(cat /usr/lib/modules/$_extramodules/version)"
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname%-*}-${pkgver}
|
|
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 *.ko
|
|
find "$pkgdir" -name '*.ko' -exec xz {} +
|
|
|
|
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
|
|
}
|