mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-04 00:57:14 +08:00
62 lines
2.1 KiB
Bash
62 lines
2.1 KiB
Bash
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
|
|
|
|
# Find the kernel name inside the chroot
|
|
_extramodules=extramodules-3.2-lts
|
|
_kver="$(cat /usr/lib/modules/${_extramodules}/version)"
|
|
|
|
pkgname=acpi_call-lts
|
|
_pkgname=acpi_call
|
|
pkgver=1.0.0
|
|
pkgrel=7
|
|
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>=3.2' 'linux-lts<3.4' 'linux-lts-headers')
|
|
makedepends=('git')
|
|
provides=('acpi-call-lts')
|
|
replaces=('acpi-call-lts')
|
|
conflicts=('acpi-call-lts')
|
|
install=acpi_call.install
|
|
source=("https://github.com/mkottman/acpi_call/archive/v${pkgver}.tar.gz")
|
|
md5sums=('3c71239792ddd725d13f7c8d168b4ecf')
|
|
|
|
build() {
|
|
cd ${srcdir}/$_pkgname-${pkgver}
|
|
|
|
sed \
|
|
-e 's/$(shell uname -r)/3.2.63-1-lts/g' \
|
|
-i Makefile
|
|
|
|
make
|
|
}
|
|
package() {
|
|
cd ${srcdir}/$_pkgname-${pkgver}
|
|
install -d ${pkgdir}/usr/share/$_pkgname
|
|
install -d ${pkgdir}/usr/bin
|
|
install -Dm755 ${srcdir}/$_pkgname-${pkgver}/examples/asus1215n.sh \
|
|
${pkgdir}/usr/share/$_pkgname
|
|
install -Dm755 ${srcdir}/$_pkgname-${pkgver}/examples/m11xr2.sh \
|
|
${pkgdir}/usr/share/$_pkgname
|
|
install -Dm755 ${srcdir}/$_pkgname-${pkgver}/examples/dellL702X.sh \
|
|
${pkgdir}/usr/share/$_pkgname
|
|
install -Dm755 ${srcdir}/$_pkgname-${pkgver}/examples/turn_off_gpu.sh \
|
|
${pkgdir}/usr/share/$_pkgname
|
|
ln -s /usr/share/$_pkgname/turn_off_gpu.sh \
|
|
${pkgdir}/usr/bin/turn_off_gpu.sh
|
|
install -Dm755 ${srcdir}/$_pkgname-${pkgver}/support/query_dsdt.pl \
|
|
${pkgdir}/usr/share/$_pkgname-${pkgver}
|
|
cp -R support/windump_hack \
|
|
${pkgdir}/usr/share/$_pkgname/
|
|
install -Dm644 README.md \
|
|
${pkgdir}/usr/share/$_pkgname/README.md
|
|
|
|
msg2 "Building module for $_kver..."
|
|
|
|
# KDIR is necessary even when cleaning
|
|
#make KDIR=/usr/src/linux-${_kver} clean
|
|
make KDIR=/usr/src/linux-${_kver}
|
|
|
|
install -D -m644 acpi_call.ko $pkgdir/usr/lib/modules/${_kver}/kernel/drivers/acpi/acpi_call.ko
|
|
}
|