summaryrefslogtreecommitdiff
path: root/libre/acpi_call-libre-lts/PKGBUILD
blob: 70c4749c35a89e9130cd21194ba6e32f94582832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# $Id: PKGBUILD 114722 2014-07-03 11:32:04Z bpiotrowski $
# Maintainer (Arch): Maxime Gauduin <alucryd@gmail.com>
# Contributor (Arch): mortzu <me@mortzu.de>
# Contributor (Arch): fnord0 <fnord0@riseup.net>
# Maintainer: André Silva <emulatorman@parabola.nu>

_pkgname=acpi_call-lts
pkgname=acpi_call-libre-lts
pkgver=1.1.0
pkgrel=5
_extramodules=extramodules-3.10-LIBRE-LTS
pkgdesc='A linux kernel module that enables calls to ACPI methods through /proc/acpi/call (built for the linux-libre-lts kernel package)'
arch=('i686' 'x86_64')
url="http://github.com/mkottman/${_pkgname%-*}"
license=('GPL')
depends=('linux-libre-lts>=3.10.26')
makedepends=('linux-libre-lts-headers>=3.10.26')
replaces=("${_pkgname}")
conflicts=("${_pkgname}")
provides=("${_pkgname%-*}" "${_pkgname}=${pkgver}")
install="${_pkgname%-*}.install"
source=("${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}/
}

# vim: ts=2 sw=2 et: