Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 16 additions & 15 deletions packages/l/lenovo-legion-linux/package.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# yaml-language-server: $schema=/usr/share/ypkg/schema/schema.json
name : lenovo-legion-linux
version : 0.0.20
release : 34
release : 35
source :
- https://github.com/johnfanv2/LenovoLegionLinux/archive/refs/tags/v0.0.20.tar.gz : c9974cfde03d8fd73de0a09628189f8fd9341037f10e28649b2fe5d1ec68bb2e
extract : false
# Waiting for upstream to tag a new release
- git|https://github.com/johnfanv2/LenovoLegionLinux.git : 7c19579d13ce686cf1e237699b9a78e80d03c977
homepage : https://github.com/johnfanv2/LenovoLegionLinux
license : GPL-2.0-or-later
component :
Expand Down Expand Up @@ -45,22 +45,23 @@ rundeps :
- pyyaml
setup : |
# Prep build dirs for each kernel version
mkdir current lts
tar --strip-components=1 -xf $sources/v*.tar.gz -C current
tar --strip-components=1 -xf $sources/v*.tar.gz -C lts
cp -r $PKG_BUILD_DIR/LenovoLegionLinux.git $PKG_BUILD_DIR/current
cp -r $PKG_BUILD_DIR/LenovoLegionLinux.git $PKG_BUILD_DIR/lts

sed -i 's|version = _VERSION|version = %version%|' */python/legion_linux/setup.cfg
sed -i 's|version = _VERSION|version = %version%|' $PKG_BUILD_DIR/*/python/legion_linux/setup.cfg
build : |
%make -C current/kernel_module KERNELVERSION=%kernel_version_current% KSRC=%libdir%/modules/%kernel_version_current%/build
%make -C lts/kernel_module KERNELVERSION=%kernel_version_lts% KSRC=%libdir%/modules/%kernel_version_lts%/build
%make -C $PKG_BUILD_DIR/current/kernel_module KERNELVERSION=%kernel_version_current% KSRC=%libdir%/modules/%kernel_version_current%/build
%make -C $PKG_BUILD_DIR/lts/kernel_module KERNELVERSION=%kernel_version_lts% KSRC=%libdir%/modules/%kernel_version_lts%/build

cd current/python/legion_linux
python3 -m build --wheel --no-isolation
pushd python/legion_linux
python3 -m build --wheel --no-isolation
popd
install : |
install -Dm00644 current/kernel_module/legion-laptop.ko -t $installdir/%libdir%/modules/%kernel_version_current%/extra/drivers/platform/x86/
install -Dm00644 lts/kernel_module/legion-laptop.ko -t $installdir/%libdir%/modules/%kernel_version_lts%/extra/drivers/platform/x86/
install -Dm00644 $PKG_BUILD_DIR/current/kernel_module/legion-laptop.ko -t $installdir/%libdir%/modules/%kernel_version_current%/extra/drivers/platform/x86/
install -Dm00644 $PKG_BUILD_DIR/lts/kernel_module/legion-laptop.ko -t $installdir/%libdir%/modules/%kernel_version_lts%/extra/drivers/platform/x86/

find "$installdir" -name '*.ko' -exec strip --strip-debug {} \; -exec zstd {} \; -exec rm -v {} \;

cd current/python/legion_linux
python3 -m installer --destdir=%installroot% dist/*.whl
pushd python/legion_linux
python3 -m installer --destdir=%installroot% dist/*.whl
popd
17 changes: 9 additions & 8 deletions packages/l/lenovo-legion-linux/pspec_x86_64.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<PISI>
<Source>
<Name>lenovo-legion-linux</Name>
<Homepage>https://github.com/johnfanv2/LenovoLegionLinux</Homepage>
<Packager>
<Name>Troy Harvey</Name>
<Email>harvey@getsol.us</Email>
<Name>Gavin Zhao</Name>
<Email>me@gzgz.dev</Email>
</Packager>
<License>GPL-2.0-or-later</License>
<PartOf>kernel.drivers</PartOf>
Expand Down Expand Up @@ -47,6 +47,7 @@
<Path fileType="data">/usr/share/legion_linux/balanced-battery.yaml</Path>
<Path fileType="data">/usr/share/legion_linux/balanced-performance-ac.yaml</Path>
<Path fileType="data">/usr/share/legion_linux/balanced-performance-battery.yaml</Path>
<Path fileType="data">/usr/share/legion_linux/extreme-ac.yaml</Path>
<Path fileType="data">/usr/share/legion_linux/legiond.ini</Path>
<Path fileType="data">/usr/share/legion_linux/performance-ac.yaml</Path>
<Path fileType="data">/usr/share/legion_linux/performance-battery.yaml</Path>
Expand All @@ -66,7 +67,7 @@
</Description>
<PartOf>kernel.drivers</PartOf>
<RuntimeDependencies>
<Dependency releaseFrom="34">lenovo-legion-linux</Dependency>
<Dependency releaseFrom="35">lenovo-legion-linux</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib64/modules/7.0.9-341.current/extra/drivers/platform/x86/legion-laptop.ko.zst</Path>
Expand All @@ -78,19 +79,19 @@
<Description xml:lang="en">Lenovo Legion Linux (LLL) brings additional drivers and tools for Lenovo Legion series laptops to Linux. It allows you to control features like the fan curve, power mode, power limits, rapid charging, and more.
</Description>
<RuntimeDependencies>
<Dependency releaseFrom="34">lenovo-legion-linux</Dependency>
<Dependency releaseFrom="35">lenovo-legion-linux</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib64/modules/6.18.32-291.lts/extra/drivers/platform/x86/legion-laptop.ko.zst</Path>
</Files>
</Package>
<History>
<Update release="34">
<Date>2026-05-18</Date>
<Update release="35">
<Date>2026-05-22</Date>
<Version>0.0.20</Version>
<Comment>Packaging update</Comment>
<Name>Troy Harvey</Name>
<Email>harvey@getsol.us</Email>
<Name>Gavin Zhao</Name>
<Email>me@gzgz.dev</Email>
</Update>
</History>
</PISI>