1 # Contributor: fnord0 <fnord0 AT riseup DOT net>
6 pkgdesc="zen kernel module allowing one 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)"
8 url=("http://github.com/mkottman/acpi_call")
10 depends=('linux-zen-headers')
11 install=acpi_call.install
12 source=('http://64.120.245.17/repo/src/acpi_call-zen.tar.gz')
13 md5sums=('929eedddef0c32bd23c6f7ce10f031d4')
20 cd ${srcdir}/${pkgname}
25 cd ${srcdir}/${pkgname}
26 install -d ${pkgdir}/usr/share/${pkgname} || return 1
27 install -d ${pkgdir}/usr/bin || return 1
28 install -Dm755 ${srcdir}/${pkgname}/asus1215n.sh \
29 ${pkgdir}/usr/share/${pkgname} || return 1
30 install -Dm755 ${srcdir}/${pkgname}/m11xr2.sh \
31 ${pkgdir}/usr/share/${pkgname} || return 1
32 install -Dm755 ${srcdir}/${pkgname}/query_dsdt.pl \
33 ${pkgdir}/usr/share/${pkgname} || return 1
34 install -Dm755 ${srcdir}/${pkgname}/test_off.sh \
35 ${pkgdir}/usr/share/${pkgname} || return 1
36 ln -s /usr/share/${pkgname}/test_off.sh \
37 ${pkgdir}/usr/bin/test_off.sh || return 1
39 ${pkgdir}/usr/share/${pkgname}/
40 install -Dm644 README \
41 ${pkgdir}/usr/share/${pkgname}/README
43 for _kernver in $(file /boot/* | grep "Linux kernel" | grep "zen" | sed -e 's/^.*version //g' -e 's/ .*$//g' | xargs); do
44 msg2 "Building module for $_kernver..."
46 # KDIR is necessary even when cleaning
47 make KDIR=/usr/src/linux-${_kernver} clean
48 make KDIR=/usr/src/linux-${_kernver}
50 install -D -m644 acpi_call.ko ${pkgdir}/lib/modules/${_kernver}/kernel/drivers/acpi/acpi_call.ko