summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormrfaber2018-09-30 07:32:50 +0200
committermrfaber2018-09-30 07:32:50 +0200
commit2e2d3cbd892ddcc3773231a758247ff5fdf7c51c (patch)
treee9237b2209da9541aa7f4d187f8a15046e29e893
parent0278b626a829ba1f2348241343ec902e4f35af87 (diff)
downloadaur-2e2d3cbd892ddcc3773231a758247ff5fdf7c51c.tar.gz
Update for linux-ck>4.18
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD73
-rw-r--r--acpi_call-ck.install14
3 files changed, 56 insertions, 49 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a45ad536702b..fc01265e7cc1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,17 @@
pkgbase = acpi_call-ck
pkgdesc = A linux-ck kernel module that enables calls to ACPI methods through /proc/acpi/call
pkgver = 1.1.0
- pkgrel = 9
- url = http://github.com/mkottman/acpi_call
- install = acpi_call-ck.install
- arch = i686
+ pkgrel = 10
+ url = https://github.com/mkottman/acpi_call
arch = x86_64
license = GPL
- makedepends = linux-ck-headers>=4.4
- makedepends = linux-ck-headers<4.5
- depends = linux-ck>=4.4
- depends = linux-ck<4.5
+ makedepends = linux-ck-headers>=4.18
+ makedepends = linux-ck-headers<4.19
+ depends = linux-ck>=4.18
+ depends = linux-ck<4.19
provides = acpi_call
- source = http://github.com/mkottman/acpi_call/archive/v1.1.0.tar.gz
+ source = acpi_call-ck-generic-1.1.0.tar.gz::https://github.com/mkottman/acpi_call/archive/v1.1.0.tar.gz
sha256sums = d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0
-pkgname = acpi_call-ck
+pkgname = acpi_call-ck-generic
diff --git a/PKGBUILD b/PKGBUILD
index 764f526bb0ca..3cde7f6facef 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,46 +1,69 @@
-# $Id$
# Maintainer: Adam Hirst <adam@aphirst.karoo.co.uk>
# Maintainer: Zuyi Hu <hzy0668808@gmail.com>
-# Contributor: Maxime Gauduin <alucryd@gmail.com>
+# Maintainer: mrfaber <mrfaber@example.com>
+# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: mortzu <me@mortzu.de>
# Contributor: fnord0 <fnord0@riseup.net>
-pkgname=acpi_call-ck
+
+pkgbase=acpi_call-ck
+pkgname=(acpi_call-ck-generic)
+# replace -generic with your appropriate optimized ck version
+ # acpi_call-ck-atom
+ # acpi_call-ck-silvermont
+ # acpi_call-ck-core2
+ # acpi_call-ck-nehalem
+ # acpi_call-ck-sandybridge
+ # acpi_call-ck-ivybridge
+ # acpi_call-ck-haswell
+ # acpi_call-ck-broadwell
+ # acpi_call-ck-skylake
+ # acpi_call-ck-p4
+ # acpi_call-ck-pentm
+ # acpi_call-ck-kx
+ # acpi_call-ck-k10
+ # acpi_call-ck-bobcat
+ # acpi_call-ck-bulldozer
+ # acpi_call-ck-piledriver
+ # acpi_call-ck-zen
pkgver=1.1.0
-pkgrel=9
-_extramodules=extramodules-4.4-ck
+pkgrel=10
pkgdesc='A linux-ck kernel module that enables calls to ACPI methods through /proc/acpi/call'
-arch=('i686' 'x86_64')
-url="http://github.com/mkottman/${pkgname%-*}"
+url='https://github.com/mkottman/acpi_call'
+arch=('x86_64')
license=('GPL')
-depends=('linux-ck>=4.4' 'linux-ck<4.5')
-makedepends=('linux-ck-headers>=4.4' 'linux-ck-headers<4.5')
-provides=("${pkgname%-*}")
-install="${pkgname}.install"
-source=("${url}/archive/v${pkgver}.tar.gz")
+depends=('linux-ck>=4.18' 'linux-ck<4.19')
+makedepends=('linux-ck-headers>=4.18' 'linux-ck-headers<4.19')
+provides=('acpi_call')
+_extramodules=extramodules-${pkgname#acpi_call-}
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mkottman/acpi_call/archive/v${pkgver}.tar.gz")
sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0')
-build() {
- cd ${pkgname%-*}-${pkgver}
+prepare() {
+ cd ${pkgname%%-*}-${pkgver}
- sed -i '9s/acpi/linux/' acpi_call.c
+ # Fix build with Linux >= 3.17
+ sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
+ # Fix build with Linux >= 4.12
+ sed -i 's|asm/uaccess.h|linux/uaccess.h|' acpi_call.c
+}
- make KVERSION="${_kernver}"
+build() {
+ cd ${pkgname%%-*}-${pkgver}
+ make KVERSION="$(cat /usr/lib/modules/$_extramodules/version)"
}
package() {
- cd ${pkgname%-*}-${pkgver}
+ cd ${pkgname%%-*}-${pkgver}
+ install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 *.ko
+ find "$pkgdir" -name '*.ko' -exec xz {} +
- 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
+ echo ${pkgname%%-*} | install -Dm644 /dev/stdin "$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}/
+ mkdir -p "$pkgdir/usr/share/${pkgname}"
+ cp -t "$pkgdir/usr/share/${pkgname}" -dr --no-preserve=ownership examples support
}
-# vim: ts=2 sw=2 et:
+# vim:set ts=2 sw=2 et:
diff --git a/acpi_call-ck.install b/acpi_call-ck.install
deleted file mode 100644
index 47810d738cd1..000000000000
--- a/acpi_call-ck.install
+++ /dev/null
@@ -1,14 +0,0 @@
-post_install() {
- _extramodules=extramodules-4.4-ck
- depmod $(cat /usr/lib/modules/${_extramodules}/version)
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
-
-# vim: ts=2 sw=2 et: