# Maintainer: MrDuartePT # Maintainer: xenhat # Maintainer: 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 }