diff --git a/packages/lenovolegionlinux-git/.SRCINFO b/packages/lenovolegionlinux-git/.SRCINFO index 9f5df4caec..725b4d2063 100644 --- a/packages/lenovolegionlinux-git/.SRCINFO +++ b/packages/lenovolegionlinux-git/.SRCINFO @@ -1,16 +1,17 @@ pkgbase = lenovolegionlinux-git pkgdesc = LenovoLegionLinux (LLL) brings additional drivers and tools for Lenovo Legion series laptops to Linux. PLEASE READ THE REPO BEFORE INSTALL THIS PACKAGE!!! - pkgver = r1.c1e9b55 + pkgver = 1.c1e9b55 pkgrel = 0 url = https://github.com/johnfanv2/LenovoLegionLinux install = lenovolegionlinux.install arch = x86_64 - license = GPL + license = GPL-2.0-only depends = python3-pyqt6 depends = python3-argcomplete depends = polkitd depends = python3-darkdetect makedepends = git + makedepends = python3 makedepends = python3-build makedepends = python3-installer makedepends = python3-setuptools diff --git a/packages/lenovolegionlinux-git/lenovolegionlinux-git.pacscript b/packages/lenovolegionlinux-git/lenovolegionlinux-git.pacscript new file mode 100644 index 0000000000..82752df716 --- /dev/null +++ b/packages/lenovolegionlinux-git/lenovolegionlinux-git.pacscript @@ -0,0 +1,85 @@ +# Maintainer: MrDuartePT + +_pkgname=lenovolegionlinux +pkgname=${_pkgname}-git +pkgver=1.c1e9b55 +pkgrel=0 +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-2.0-only') + +depends=( + python3 + python3-argcomplete + python3-yaml + python3-pyqt6 + polkitd + python3-darkdetect +) + +makedepends=( + git + python3-build + python3-installer + python3-setuptools + python3-wheel + libinih-dev +) + +optdepends=( + "lenovolegionlinux-dkms-git: DKMS module" +) + +replaces=( + "${_pkgname}" +) + +source=( + "${_pkgname}::git+https://github.com/johnfanv2/LenovoLegionLinux" + "https://raw.githubusercontent.com/benhoyt/inih/refs/heads/master/ini.c" +) +sha256sums=('SKIP') + +pkgver() { + cd "${_pkgname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" +} + +prepare() { + cd "${_pkgname}" + sed -i "s/version = _VERSION/version = 1.0.0/g" "${srcdir}/${_pkgname}/python/legion_linux/setup.cfg" +} + +build() { + cd "${srcdir}/${_pkgname}/python/legion_linux" + python3 -m build --wheel --no-isolation + + # Compile legiond daemon + cd legion_linux/extra/service/legiond + cp "${srcdir}/ini.c" ./ + sed -i 's/^SOURCE1 = \$(TARGET1).c modules\/\*\.c$/SOURCE1 = $(TARGET1).c ini.c modules\/\*.c/' Makefile + make +} + +package() { + mkdir -p "${pkgdir}/etc/systemd/system" + + cd "${srcdir}/${_pkgname}/python/legion_linux" + python3 -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" +} + +post_install() { + echo "Default config files are present in /usr/share/legion_linux" + echo "Frist install: Pls copy folder /usr/share/legion_linux to /etc/legion_linux" + echo "Is also provided acpi exemple on /usr/share/legion_linux/acpi" +}