[arch-commits] Commit in acpi_call-lts/trunk (PKGBUILD)

Jan Steffens heftig at archlinux.org
Wed Jul 22 21:29:01 UTC 2020


    Date: Wednesday, July 22, 2020 @ 21:29:01
  Author: heftig
Revision: 664918

1.1.0-160: linux-lts 5.4.53-1

Modified:
  acpi_call-lts/trunk/PKGBUILD

----------+
 PKGBUILD |   37 +++++++++++++++----------------------
 1 file changed, 15 insertions(+), 22 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-22 21:28:59 UTC (rev 664917)
+++ PKGBUILD	2020-07-22 21:29:01 UTC (rev 664918)
@@ -4,43 +4,36 @@
 
 pkgname=acpi_call-lts
 pkgver=1.1.0
-pkgrel=159
+pkgrel=160
 pkgdesc='A linux kernel module that enables calls to ACPI methods through /proc/acpi/call'
 url='https://github.com/mkottman/acpi_call'
 arch=('x86_64')
 license=('GPL')
-makedepends=('linux-lts-headers')
+makedepends=('linux-lts-headers' "acpi_call-dkms=$pkgver")
+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
+build() {
+  _kernver=$(</usr/src/linux-lts/version)
 
-  # Fix build with Linux >= 3.17
-  sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
-
-  # Fix build with Linux >= 4.12
-  sed -i 's|asm/uaccess.h|linux/uaccess.h|' acpi_call.c
+  fakeroot dkms build --dkmstree "$srcdir" -m acpi_call/$pkgver -k $_kernver
 }
 
-build() {
-  cd acpi_call-$pkgver
-  make KVERSION="$(</usr/src/linux-lts/version)"
-}
-
 package() {
   depends=(linux-lts)
 
-  cd acpi_call-$pkgver
-  _extradir="/usr/lib/modules/$(</usr/src/linux-lts/version)/extramodules"
-  install -Dt "$pkgdir$_extradir" -m644 *.ko
-  find "$pkgdir" -name '*.ko' -exec xz {} +
+  _kernver=$(</usr/src/linux-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"
 }
 
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list