summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 62b0487acc00e88674f86a4d07e7872b4d3b0a79 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: MrDuartePT <gonegrier.duarte@gmail.com>
# Maintainer: xenhat <aur@xenh.at>
# Maintainer: johnfanv2 <https://github.com/johnfanv2>

_pkgname=lenovolegionlinux
pkgname=${_pkgname}-dkms-git
pkgver=r255.3d941cc
pkgrel=0
pkgdesc="LenovoLegionLinux (LLL) DKMS module"
arch=("x86_64")
url="https://github.com/johnfanv2/LenovoLegionLinux"
license=('GPL')
makedepends=("git"
		"dkms"
		"lm_sensors"
		"i2c-tools" 
		"dmidecode"
		"lenovolegionlinux-git"
)
depends=(lenovolegionlinux-git)
conflicts=(
  legion-fan-utils-linux-git
)
source=("${_pkgname}::git+https://github.com/johnfanv2/LenovoLegionLinux")
sha256sums=('SKIP')
install="lenovolegionlinux.install"

pkgver() {
  cd "${_pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare() {
  cd "${_pkgname}"
  pkgver_commit=$(echo $pkgver | cut -c 6-)
  git checkout $pkgver_commit
}

package() {
	cd "${srcdir}/${_pkgname}/kernel_module/"
	install -Dm644 dkms.conf ${pkgdir}/usr/src/${_pkgname}-1.0.0/dkms.conf
	cp -r {issue-warning.sh,legion-laptop-unused-snippets.c,legion-laptop.c,Makefile} ${pkgdir}/usr/src/$_pkgname-1.0.0/

	cd "${srcdir}/${_pkgname}/deploy/"
	install -Dm644 LenovoLegionLinux.hook ${pkgdir}/etc/pacman.d/hooks/LenovoLegionLinux.hook
	install -Dm775 LenovoLegionLinux ${pkgdir}/usr/bin/LenovoLegionLinux
}