diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2020-12-08 20:01:06 +0100 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2020-12-08 20:01:06 +0100 |
commit | df96ee4a70df70d029d6285be9c44113507b377a (patch) | |
tree | 2ec1299ff81daee267eed6f26eb81ae1f6a56369 /libre/acpi_call-lts | |
parent | 770de002867b114223bb2ba91af7259b90be65d1 (diff) | |
download | abslibre-df96ee4a70df70d029d6285be9c44113507b377a.tar.gz abslibre-df96ee4a70df70d029d6285be9c44113507b377a.tar.bz2 abslibre-df96ee4a70df70d029d6285be9c44113507b377a.zip |
libre/acpi-call{,-dkms,-lts}: reworked and rebuilt for new kernels
Diffstat (limited to 'libre/acpi_call-lts')
-rw-r--r-- | libre/acpi_call-lts/PKGBUILD | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/libre/acpi_call-lts/PKGBUILD b/libre/acpi_call-lts/PKGBUILD index 6b2c9040e..bd45704c7 100644 --- a/libre/acpi_call-lts/PKGBUILD +++ b/libre/acpi_call-lts/PKGBUILD @@ -6,11 +6,11 @@ # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> -_basekernel=5.4.60 +_basekernel=5.4.78 pkgname=acpi_call-lts -pkgver=1.1.0 -pkgrel=162 +pkgver=1.2.1 +pkgrel=9 pkgrel+=.parabola1.basekernel${_basekernel} pkgdesc='A linux kernel module that enables calls to ACPI methods through /proc/acpi/call' pkgdesc+=' (for linux-libre-lts)' @@ -18,36 +18,29 @@ url='https://github.com/mkottman/acpi_call' arch=('x86_64') arch+=('i686' 'armv7h') license=('GPL') -makedepends=(linux-libre-lts-headers=${_basekernel} libelf) +makedepends=(linux-libre-lts-headers=${_basekernel} acpi_call-dkms=$pkgver libelf) +conflicts=('acpi_call-dkms') provides=('acpi_call') -source=("acpi_call-${pkgver}.tar.gz::https://github.com/mkottman/acpi_call/archive/v${pkgver}.tar.gz") -sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0') - -prepare() { - cd acpi_call-$pkgver - - # Fix build with Linux-libre >= 3.17-gnu - sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c - - # Fix build with Linux-libre >= 4.12 - sed -i 's|asm/uaccess.h|linux/uaccess.h|' acpi_call.c -} build() { - cd acpi_call-$pkgver - make KVERSION="$(</usr/src/linux-libre-lts/version)" + _kernver=$(</usr/src/linux-libre-lts/version) + + fakeroot dkms build --dkmstree "$srcdir" -m acpi_call/$pkgver -k $_kernver } package() { depends=(linux-libre-lts=${_basekernel}) - cd acpi_call-$pkgver - _extradir="/usr/lib/modules/$(</usr/src/linux-libre-lts/version)/extramodules" - install -Dt "$pkgdir$_extradir" -m644 *.ko - find "$pkgdir" -name '*.ko' -exec xz {} + + _kernver=$(</usr/src/linux-libre-lts/version) + + install -Dt "$pkgdir/usr/lib/modules/$_kernver/extramodules" -m0644 \ + acpi_call/${pkgver}/$_kernver/$CARCH/module/* + + # compress each module individually + find "$pkgdir" -name '*.ko' -exec xz -T1 {} + echo acpi_call | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/$pkgname.conf" - mkdir -p "$pkgdir/usr/share/$pkgname" - cp -t "$pkgdir/usr/share/$pkgname" -dr --no-preserve=ownership examples support + mkdir -p "$pkgdir/usr/share" + cp -a /usr/share/acpi_call "$pkgdir/usr/share/$pkgname" } |