summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4b57e47ec40e065d2ca304742a5408b044a03674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Maintainer: Egor Vorontsov <sdoregor@sdore.me>
# Based on: huawei-wmi-dkms by ylxdzsw

_pkgbase="huawei-wmi"
pkgname="${_pkgbase}-dkms-kbdlight-git"
pkgver=3.3.r12.gc142bce
pkgrel=1
pkgdesc="Huawei WMI laptop extras driver (feat/kbdlight branch)"
url="https://github.com/sermart1234/Huawei-WMI"
arch=('x86_64')
license=('GPLv2')
depends=('dkms')
source=("${_pkgbase}::git+https://github.com/aymanbagabas/Huawei-WMI#branch=feat/kbdlight")
sha256sums=('SKIP')

pkgver() {
	cd "${_pkgbase}"
	# cutting off 'v' prefix that presents in the git tag
	git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
	cd "${_pkgbase}/dkms"
	dir="$(ls | tail -1)"
	cd "$dir"
	install -Dm644 'dkms.conf' 'Makefile' '../../huawei-wmi.c' -t "${pkgdir}/usr/src/${dir}"
}