blob: 94c3a2b7945ce19b1db5e217001ec274e0dba16c (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Maintainer: MrDuartePT <gonegrier.duarte@gmail.com>
# Maintainer: xenhat <aur@xenh.at>
# Maintainer: johnfanv2 <https://github.com/johnfanv2>
_pkgname=lenovolegionlinux
pkgname=${_pkgname}-git
pkgver=r255.e0a361f
pkgrel=1
pkgdesc="LenovoLegionLinux (LLL) brings additional drivers and tools for Lenovo Legion series laptops to Linux. PLEASE READ THE REPO BEFORE INSTALL THIS PACKAGE!!!"
arch=("x86_64")
url="https://github.com/johnfanv2/LenovoLegionLinux"
license=('GPL')
depends=(
python-argcomplete
python-yaml
python-pyqt6
polkit
python-darkdetect
)
makedepends=(
git
python-build
python-installer
python-setuptools
python-wheel
libinih
)
optdepends=(
"lenovolegionlinux-dkms-git: DKMS module"
)
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}"
# Use latest commit instead
#pkgver_commit=$(echo $pkgver | cut -c 6-)
#git checkout $pkgver_commit
sed -i "s/version = _VERSION/version = 1.0.0/g" "${srcdir}/${_pkgname}/python/legion_linux/setup.cfg"
}
build() {
cd "${srcdir}/${_pkgname}/python/legion_linux"
python -m build --wheel --no-isolation
# Make legiond daemon
cd legion_linux/extra/service/legiond
make
}
package() {
mkdir -p ${pkgdir}/etc/systemd/system
cd "${srcdir}/${_pkgname}/python/legion_linux"
python -m installer --destdir="$pkgdir" dist/*.whl
# Systemd service
cd "${srcdir}/${_pkgname}/extra"
install -Dm664 service/*.service "${pkgdir}/etc/systemd/system"
install -Dm664 service/*.timer "${pkgdir}/etc/systemd/system"
# legiond daemon
install -Dm775 service/legiond/legiond "${pkgdir}/usr/bin"
install -Dm775 service/legiond/legiond-ctl "${pkgdir}/usr/bin"
}
|