diff options
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" } |