mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 19:57:14 +08:00
41 lines
1.4 KiB
Bash
41 lines
1.4 KiB
Bash
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
|
|
|
|
_extramodules=extramodules-3.14-CHAKRA-LTS
|
|
_kver="$(cat /lib/modules/${_extramodules}/version)"
|
|
_kernelver=3.14.57
|
|
|
|
pkgname=acpi_call-lts
|
|
_pkgname=acpi_call
|
|
pkgver=1.1.0
|
|
pkgrel=3
|
|
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>=${_kernelver}")
|
|
makedepends=("linux-lts-headers=${_kernelver}")
|
|
provides=("${pkgname%-*}")
|
|
install="${pkgname%-*}.install"
|
|
source=("acpi_call-$pkgver.tar.gz::${url}/archive/v${pkgver}.tar.gz")
|
|
sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0')
|
|
|
|
build() {
|
|
cd ${pkgname%-*}-${pkgver}
|
|
|
|
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
|
|
|
|
make KVERSION="${_kernver}"
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname%-*}-${pkgver}
|
|
|
|
install -dm 755 "${pkgdir}"/usr/lib/{modules/${_extramodules},modules-load.d}
|
|
install -m 644 ${pkgname%-*}.ko "${pkgdir}"/usr/lib/modules/${_extramodules}/
|
|
gzip "${pkgdir}"/usr/lib/modules/${_extramodules}/${pkgname%-*}.ko
|
|
echo ${pkgname%-*} > "${pkgdir}"/usr/lib/modules-load.d/${pkgname}.conf
|
|
|
|
install -dm 755 "${pkgdir}"/usr/share/${pkgname}
|
|
cp -dr --no-preserve='ownership' {examples,support} "${pkgdir}"/usr/share/${pkgname}/
|
|
}
|