Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: lenovolegionlinux-dkms-git, lenovolegionlinux-git, python3-darkdetect #6792

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c6f105c
lenovolegionlinux-dkms-git: add package
MrDuartePT Dec 27, 2024
6f4707e
python3-darkdetect: add package
MrDuartePT Dec 27, 2024
266e06b
lenovolegionlinux-git: add package
MrDuartePT Dec 27, 2024
9069b29
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 31, 2024
9773169
lenovolegionlinux-dkms-git: removes some spaces
MrDuartePT Dec 31, 2024
f09abc9
lenovolegionlinux-git: add sha256sums
MrDuartePT Dec 31, 2024
608b237
python3-darkdetect: add sha256sums
MrDuartePT Dec 31, 2024
03082ed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 31, 2024
318486c
lenovolegionlinux-dkms-git: remove unload module from post steps
MrDuartePT Dec 31, 2024
0965173
lenovolegionlinux-git: add patched Makefile
MrDuartePT Dec 31, 2024
d79e958
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 31, 2024
b16c06a
lenovolegionlinux-git: fix install and description
MrDuartePT Jan 2, 2025
c5ac1c7
lenovolegionlinux-dkms-git: fix package
MrDuartePT Jan 2, 2025
f5c5d96
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 2, 2025
368e657
Merge branch 'master' into lenovolegionlinux
Elsie19 Jan 3, 2025
77f64f5
lenovolegionlinux-dkms-git: fix typo
MrDuartePT Jan 12, 2025
0c537cc
lenovolegionlinux-git: update Makefile instead to work
MrDuartePT Jan 12, 2025
869cc61
Merge branch 'master' into lenovolegionlinux
oklopfer Jan 14, 2025
d950c8c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ lazygit
lbry-deb
legcord-deb
lemonbar-xft-git
lenovolegionlinux-dkms-git
lenovolegionlinux-git
lens
lf-bin
libaquamarine-bin
Expand Down Expand Up @@ -449,6 +451,7 @@ protonvpn-nm-lib
pulsar-deb
pycharm-community-bin
python3-anyascii
python3-darkdetect
python3-flit-core
python3-fvs
python3-gbinder-deb
Expand Down
17 changes: 17 additions & 0 deletions packages/lenovolegionlinux-dkms-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pkgbase = lenovolegionlinux-dkms-git
pkgver = 1.c1e9b55
pkgdesc = LenovoLegionLinux (LLL) DKMS module
url = https://github.com/johnfanv2/LenovoLegionLinux
arch = amd64
depends = dkms
makedepends = git
makedepends = lm-sensors
makedepends = i2c-tools
makedepends = dmidecode
replaces = lenovolegionlinux-dkms
license = GPL-2.0-only
maintainer = MrDuartePT <[email protected]>
source = lenovolegionlinux::git+https://github.com/johnfanv2/LenovoLegionLinux
sha256sums = SKIP

pkgname = lenovolegionlinux-dkms-git
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
_pkgname="lenovolegionlinux"
pkgname="${_pkgname}-dkms-git"
pkgver="1.c1e9b55"
pkgdesc="LenovoLegionLinux (LLL) DKMS module"
arch=("amd64")
url='https://github.com/johnfanv2/LenovoLegionLinux'
maintainer=("MrDuartePT <[email protected]>")
license=('GPL-2.0-only')
makedepends=(
"git"
"lm-sensors"
"i2c-tools"
"dmidecode"
)
depends=("dkms")
pacdep=("${_pkgname}-git")
MrDuartePT marked this conversation as resolved.
Show resolved Hide resolved
replaces=("${_pkgname}-dkms")
source=("${_pkgname}::git+https://github.com/johnfanv2/LenovoLegionLinux")
MrDuartePT marked this conversation as resolved.
Show resolved Hide resolved
sha256sums=('SKIP')

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
MrDuartePT marked this conversation as resolved.
Show resolved Hide resolved
}

post_install() {
RED='\033[0;31m'
BOLD=$(tput bold)
echo -e "${RED} ${BOLD} If you have a 2022 or 2023 model, please help testing the new features '\e]8;;https://github.com/johnfanv2/LenovoLegionLinux/issues/46\ahere\e]8;;\a'"
}

post_upgrade() {
post_install "$1"
}
MrDuartePT marked this conversation as resolved.
Show resolved Hide resolved

post_remove() {
RED='\033[0;31m'
BOLD=$(tput bold)
echo -e "${RED} ${BOLD} If you have a 2022 or 2023 model, please help testing the new features '\e]8;;https://github.com/johnfanv2/LenovoLegionLinux/issues/46\ahere\e]8;;\a'"
}
27 changes: 27 additions & 0 deletions packages/lenovolegionlinux-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pkgbase = lenovolegionlinux-git
pkgver = 1.c1e9b55
pkgdesc = LenovoLegionLinux (LLL) brings additional drivers and tools for Lenovo Legion series laptops to Linux. PLEASE READ THE REPO BEFORE INSTALL THIS PACKAGE!!!
url = https://github.com/johnfanv2/LenovoLegionLinux
arch = amd64
depends = python3
depends = python3-argcomplete
depends = python3-yaml
depends = python3-pyqt6
depends = polkitd
makedepends = git
makedepends = python3-build
makedepends = python3-installer
makedepends = python3-setuptools
makedepends = python3-wheel
makedepends = libinih-dev
replaces = lenovolegionlinux
license = GPL-2.0-only
maintainer = MrDuartePT <[email protected]>
source = lenovolegionlinux::git+https://github.com/johnfanv2/LenovoLegionLinux
source = https://raw.githubusercontent.com/benhoyt/inih/refs/tags/r58/ini.c
source = Makefile-debian
sha256sums = SKIP
sha256sums = 217fa78f0380669c91a565f3e414d0a8be0f7a7fdfd1e3839f213e86aa574a95
sha256sums = e4452e50cabfd488e5b04af627187bae184ce72489a6785591c1b66710af7333

pkgname = lenovolegionlinux-git
24 changes: 24 additions & 0 deletions packages/lenovolegionlinux-git/Makefile-debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CC ?= clang

CFLAGS ?= -O2
CFLAGS += -Wall -linih

SRC = $(wildcard ini.c modules/*.c)
OBJ = $(SRC:.c=.o)

TARGET = legiond legiond-ctl
all: $(TARGET)

legiond: $(OBJ) legiond.o
$(CC) $(CFLAGS) $(OBJ) legiond.o -o legiond

legiond-ctl: legiond-ctl.o
$(CC) $(CFLAGS) legiond-ctl.o -o legiond-ctl

%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@

clean:
rm -f $(OBJ) $(TARGET) legiond.o legiond-ctl.o

.PHONY: all clean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar to my comment here, this should simply be text inside of the pacscript

Copy link
Author

@MrDuartePT MrDuartePT Jan 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since is only one line changed I decided to use sed in the prepare instead of updating the file I gonna see if it work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now legiond compile with no problems

74 changes: 74 additions & 0 deletions packages/lenovolegionlinux-git/lenovolegionlinux-git.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
_pkgname="lenovolegionlinux"
pkgname="${_pkgname}-git"
pkgver="1.c1e9b55"
pkgdesc="LenovoLegionLinux (LLL) brings additional drivers and tools for Lenovo Legion series laptops to Linux. PLEASE READ THE REPO BEFORE INSTALL THIS PACKAGE!!!"
MrDuartePT marked this conversation as resolved.
Show resolved Hide resolved
arch=("amd64")
url='https://github.com/johnfanv2/LenovoLegionLinux'
maintainer=("MrDuartePT <[email protected]>")
license=('GPL-2.0-only')
depends=(
python3
python3-argcomplete
python3-yaml
python3-pyqt6
polkitd
)
pacdep=(python3-darkdetect)
MrDuartePT marked this conversation as resolved.
Show resolved Hide resolved
makedepends=(
git
python3-build
python3-installer
python3-setuptools
python3-wheel
libinih-dev
)
#optdepends=("lenovolegionlinux-dkms-git: DKMS module") # needs to be fix
replaces=("${_pkgname}")
source=(
"${_pkgname}::git+https://github.com/johnfanv2/LenovoLegionLinux"
"https://raw.githubusercontent.com/benhoyt/inih/refs/tags/r58/ini.c"
"Makefile-debian"
)
sha256sums=(
'SKIP'
'217fa78f0380669c91a565f3e414d0a8be0f7a7fdfd1e3839f213e86aa574a95'
'e4452e50cabfd488e5b04af627187bae184ce72489a6785591c1b66710af7333'
)

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" ./
cp "${srcdir}/Makefile-debian" ./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"
MrDuartePT marked this conversation as resolved.
Show resolved Hide resolved
}

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"
}
17 changes: 17 additions & 0 deletions packages/python3-darkdetect/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pkgbase = python3-darkdetect
pkgver = 0.8.0
pkgdesc = Detect OS Dark Mode from Python
url = https://github.com/albertosottile/darkdetect
arch = any
depends = python3
makedepends = git
makedepends = python3-build
makedepends = python3-installer
makedepends = python3-wheel
makedepends = python3-setuptools
license = BSD-1-Clause
maintainer = MrDuartePT <[email protected]>
source = https://github.com/albertosottile/darkdetect/archive/refs/tags/v0.8.0.tar.gz
sha256sums = 100eea1a610bb19610a68b11ff468c13b1c2863d1254c2d5b37d198a1beb3227

pkgname = python3-darkdetect
29 changes: 29 additions & 0 deletions packages/python3-darkdetect/python3-darkdetect.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
_pkgname="darkdetect"
pkgname="python3-darkdetect"
pkgver="0.8.0"
pkgdesc='Detect OS Dark Mode from Python'
arch=('any')
url='https://github.com/albertosottile/darkdetect'
maintainer=("MrDuartePT <[email protected]>")
license=('BSD-1-Clause')
depends=('python3')
makedepends=(
'git'
'python3-build'
'python3-installer'
'python3-wheel'
'python3-setuptools'
)
source=("https://github.com/albertosottile/darkdetect/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('100eea1a610bb19610a68b11ff468c13b1c2863d1254c2d5b37d198a1beb3227')

build() {
cd "${_pkgname}-${pkgver}"
python3 -m build --wheel --no-isolation
}

package() {
cd "${_pkgname}-${pkgver}"
python3 -m installer --destdir="${pkgdir}" dist/*.whl
install -vDm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}
64 changes: 64 additions & 0 deletions srclist
Original file line number Diff line number Diff line change
Expand Up @@ -5460,6 +5460,52 @@ pkgbase = lemonbar-xft-git

pkgname = lemonbar-xft-git
---
pkgbase = lenovolegionlinux-dkms-git
pkgver = 1.c1e9b55
pkgdesc = LenovoLegionLinux (LLL) DKMS module
url = https://github.com/johnfanv2/LenovoLegionLinux
arch = amd64
depends = dkms
makedepends = git
makedepends = lm-sensors
makedepends = i2c-tools
makedepends = dmidecode
replaces = lenovolegionlinux-dkms
license = GPL-2.0-only
maintainer = MrDuartePT <[email protected]>
source = lenovolegionlinux::git+https://github.com/johnfanv2/LenovoLegionLinux
sha256sums = SKIP

pkgname = lenovolegionlinux-dkms-git
---
pkgbase = lenovolegionlinux-git
pkgver = 1.c1e9b55
pkgdesc = LenovoLegionLinux (LLL) brings additional drivers and tools for Lenovo Legion series laptops to Linux. PLEASE READ THE REPO BEFORE INSTALL THIS PACKAGE!!!
url = https://github.com/johnfanv2/LenovoLegionLinux
arch = amd64
depends = python3
depends = python3-argcomplete
depends = python3-yaml
depends = python3-pyqt6
depends = polkitd
makedepends = git
makedepends = python3-build
makedepends = python3-installer
makedepends = python3-setuptools
makedepends = python3-wheel
makedepends = libinih-dev
replaces = lenovolegionlinux
license = GPL-2.0-only
maintainer = MrDuartePT <[email protected]>
source = lenovolegionlinux::git+https://github.com/johnfanv2/LenovoLegionLinux
source = https://raw.githubusercontent.com/benhoyt/inih/refs/tags/r58/ini.c
source = Makefile-debian
sha256sums = SKIP
sha256sums = 217fa78f0380669c91a565f3e414d0a8be0f7a7fdfd1e3839f213e86aa574a95
sha256sums = e4452e50cabfd488e5b04af627187bae184ce72489a6785591c1b66710af7333

pkgname = lenovolegionlinux-git
---
pkgbase = lens
pkgver = 1.0.2
pkgdesc = LENS is a spectral dynamics processor with unbelievable punch and clarity.
Expand Down Expand Up @@ -9039,6 +9085,24 @@ pkgbase = python3-anyascii

pkgname = python3-anyascii
---
pkgbase = python3-darkdetect
pkgver = 0.8.0
pkgdesc = Detect OS Dark Mode from Python
url = https://github.com/albertosottile/darkdetect
arch = any
depends = python3
makedepends = git
makedepends = python3-build
makedepends = python3-installer
makedepends = python3-wheel
makedepends = python3-setuptools
license = BSD-1-Clause
maintainer = MrDuartePT <[email protected]>
source = https://github.com/albertosottile/darkdetect/archive/refs/tags/v0.8.0.tar.gz
sha256sums = 100eea1a610bb19610a68b11ff468c13b1c2863d1254c2d5b37d198a1beb3227

pkgname = python3-darkdetect
---
pkgbase = python3-flit-core
pkgver = 3.9.0
pkgdesc = A PEP 517 build backend for packages using Flit
Expand Down