summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f0a4ccba477c3c4c46ec33c702b103a42ef25a59 (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
# 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.e0a361f
pkgrel=0
pkgdesc="LenovoLegionLinux (LLL) DKMS module"
arch=("x86_64")
url="https://github.com/johnfanv2/LenovoLegionLinux"
license=('GPL')
makedepends=("git"
		"lm_sensors"
		"i2c-tools" 
		"dmidecode"
		"lenovolegionlinux-git"
)
depends=("dkms"
    "lenovolegionlinux-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}"
  # Use latest commit instead
  #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
}