summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a0186a3ce8c1a3baf438f539c3177130f18a83d2 (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
# 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.0e9b861
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}"
  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
}