diff options
author | Marc Rozanc | 2016-06-14 21:37:48 +0200 |
---|---|---|
committer | Marc Rozanc | 2016-06-14 21:37:48 +0200 |
commit | 00d7100d509081e4c3eefac29d359b1a2342d406 (patch) | |
tree | 53a5d89f9dca49c4249bd390be0c9a26f2c2bf42 | |
parent | a2d8e2e7099091d54d709246ee8d7a077764a264 (diff) | |
download | aur-00d7100d509081e4c3eefac29d359b1a2342d406.tar.gz |
DKMS support improved
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | Makefile | 32 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | dkms.conf (renamed from dkms.conf.in) | 7 |
4 files changed, 66 insertions, 28 deletions
@@ -1,27 +1,30 @@ # Generated by mksrcinfo v8 -# Wed Mar 16 20:33:31 UTC 2016 +# Tue Jun 14 19:37:41 UTC 2016 pkgbase = clevo-xsm-wmi-dkms pkgdesc = A reverse engineering driver for the Clevo SM series backlight keyboard (DKMS version) pkgver = 0.8 - pkgrel = 2 + pkgrel = 4 url = https://bitbucket.org/lynthium/clevo-xsm-wmi install = clevo-xsm-wmi-dkms.install arch = i686 arch = x86_64 license = GPL depends = dkms - depends = linux-headers depends = gcc depends = make + depends = linux-headers + depends = linux provides = clevo-xsm-wmi conflicts = clevo-xsm-wmi conflicts = tuxedo-wmi conflicts = tuxedo-wmi-dkms options = !emptydirs source = clevo-xsm-wmi-0.8.src.tar.gz::https://bitbucket.org/lynthium/clevo-xsm-wmi/get/v0.8.tar.gz - source = dkms.conf.in + source = dkms.conf + source = Makefile sha256sums = 0948133273d088a8610cac85d06287022cc847da7570d6d9d3f1f906352d569c - sha256sums = b6877cbd6abfb5ea24079ad740b985478ddd385062a02a45a7bce493576993de + sha256sums = 0cdf0213692a71d69f54730d1856d9f1e7b3d363d9b2a66a5d6bb363e8d8212f + sha256sums = fb20847bde676a305fda41b865b46aff52ae9de60e1262d6e9725a71d72b806b pkgname = clevo-xsm-wmi-dkms diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..1588ac7400a7 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +modname := clevo-xsm-wmi +obj-m := $(modname).o + +KVERSION := $(shell uname -r) +KDIR := /lib/modules/$(KVERSION)/build +PWD := "$$(pwd)" + +ifdef DEBUG +CFLAGS_$(obj-m) := -DDEBUG +endif + +default: + $(MAKE) -C $(KDIR) M=$(PWD) modules + +clean: + $(MAKE) O=$(PWD) -C $(KDIR) M=$(PWD) clean + +load: + -rmmod $(modname) + insmod $(modname).ko + +install: + mkdir -p /lib/modules/$(KVERSION)/misc/$(modname) + install -m 0755 -o root -g root $(modname).ko /lib/modules/$(KVERSION)/kernel/drivers/input/keyboard/$(modname) + depmod -a + +uninstall: + rm /lib/modules/$(KVERSION)/kernel/drivers/input/keyboard/$(modname)/$(modname).ko + rmdir /lib/modules/$(KVERSION)/kernel/drivers/input/keyboard/$(modname) + rmdir /lib/modules/$(KVERSION)/kernel/drivers/input/keyboard + depmod -a + @@ -1,39 +1,41 @@ # Maintainer: Marc ROZANC <marc@rozanc.fr> -_modname='clevo-xsm-wmi' -pkgname="${_modname}-dkms" +_pkgbase='clevo-xsm-wmi' +_modname=$_pkgbase +pkgname="${_pkgbase}-dkms" pkgver='0.8' _pkgtag='ac1cf19e290b' -pkgrel=2 +pkgrel=4 pkgdesc='A reverse engineering driver for the Clevo SM series backlight keyboard (DKMS version)' arch=('i686' 'x86_64') license=('GPL') url='https://bitbucket.org/lynthium/clevo-xsm-wmi' -source=("clevo-xsm-wmi-${pkgver}.src.tar.gz::https://bitbucket.org/lynthium/clevo-xsm-wmi/get/v${pkgver}.tar.gz" - "dkms.conf.in") options=(!emptydirs) -conflicts=("$_modname" 'tuxedo-wmi' 'tuxedo-wmi-dkms') -provides=("$_modname") -depends=('dkms' 'linux-headers' 'gcc' 'make') +conflicts=("$_pkgbase" 'tuxedo-wmi' 'tuxedo-wmi-dkms') +provides=("$_pkgbase") +depends=('dkms' 'gcc' 'make' 'linux-headers' 'linux') +source=("clevo-xsm-wmi-${pkgver}.src.tar.gz::https://bitbucket.org/lynthium/clevo-xsm-wmi/get/v${pkgver}.tar.gz" + "dkms.conf" + "Makefile") sha256sums=('0948133273d088a8610cac85d06287022cc847da7570d6d9d3f1f906352d569c' - 'b6877cbd6abfb5ea24079ad740b985478ddd385062a02a45a7bce493576993de') + '0cdf0213692a71d69f54730d1856d9f1e7b3d363d9b2a66a5d6bb363e8d8212f' + 'fb20847bde676a305fda41b865b46aff52ae9de60e1262d6e9725a71d72b806b') install='clevo-xsm-wmi-dkms.install' - -build() { - cd "${srcdir}/lynthium-clevo-xsm-wmi-${_pkgtag}/module" - make -} +_linux_major_version=$(pacman -Q linux | cut -d' ' -f 2 | sed -r 's/^([0-9]+\.[0-9]+).+$/\1/') +_extramodules="extramodules-${_linux_major_version}-ARCH" package() { cd "${srcdir}/lynthium-clevo-xsm-wmi-${_pkgtag}/module" + # Copy sources (including Makefile) install -dm755 "${pkgdir}/usr/src/${_modname}-${pkgver}/" - - for i in "${srcdir}/lynthium-${_modname}-${_pkgtag}/module/"{Makefile,clevo-xsm-wmi.c}; do - install -D -m644 "${i}" "${pkgdir}/usr/src/${_modname}-${pkgver}/" - done - sed "s/#MODULE_VERSION#/${pkgver}/" "${srcdir}/dkms.conf.in" > "${pkgdir}/usr/src/${_modname}-${pkgver}/dkms.conf" + install -Dm644 "${srcdir}/Makefile" "${srcdir}/dkms.conf" "clevo-xsm-wmi.c" "${pkgdir}/usr/src/${_modname}-${pkgver}/" - install -D -m644 /usr/share/licenses/common/GPL2/license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + # Copy license + install -Dm644 "/usr/share/licenses/common/GPL2/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # Module loading + install -Dm644 /dev/null "$pkgdir/usr/lib/modules-load.d/$pkgname.conf" + echo "clevo-xsm-wmi" > "$pkgdir/usr/lib/modules-load.d/$pkgname.conf" } diff --git a/dkms.conf.in b/dkms.conf index fb9578fcac2a..e9a13a3ebaae 100644 --- a/dkms.conf.in +++ b/dkms.conf @@ -1,7 +1,8 @@ -PACKAGE_NAME="tuxedo-wmi" +PACKAGE_NAME="clevo-xsm-wmi" PACKAGE_VERSION="#MODULE_VERSION#" -MAKE[0]="make KVERSION=$kernelver" +AUTOINSTALL="yes" CLEAN="make clean" +MAKE[0]="make KVERSION=$kernelver" BUILT_MODULE_NAME[0]="clevo-xsm-wmi" DEST_MODULE_LOCATION[0]="/kernel/drivers/input/keyboard" -AUTOINSTALL="yes" + |