Package Details: lenovolegionlinux-dkms-git r255.3d941cc-0

Git Clone URL: https://aur.archlinux.org/lenovolegionlinux-dkms-git.git (read-only, click to copy)
Package Base: lenovolegionlinux-dkms-git
Description: LenovoLegionLinux (LLL) DKMS module
Upstream URL: https://github.com/johnfanv2/LenovoLegionLinux
Licenses: GPL
Conflicts: legion-fan-utils-linux-git
Submitter: MrDuartePT
Maintainer: MrDuartePT (XenHat)
Last Packager: MrDuartePT
Votes: 6
Popularity: 1.14
First Submitted: 2023-04-28 00:06 (UTC)
Last Updated: 2024-04-05 15:36 (UTC)

Dependencies (6)

Required by (1)

Sources (1)

Latest Comments

xAsh commented on 2023-10-21 00:40 (UTC)

this pkg installs the presets in /usr/share/legion_linux instead of /etc/legion_linux, which makes the GUI program crash if you chose a preset

MrDuartePT commented on 2023-10-07 17:01 (UTC)

Did the change upstream @memchr https://github.com/johnfanv2/LenovoLegionLinux/commit/62e33f411a9d013fe6e91ac45c823f3962b8f925

memchr commented on 2023-10-01 09:59 (UTC)

The hook causes mkinitpcio to rebuild mkinitramfs images twice when the linux or linux-zen package is changed. This is unnecessary as mkinitcpio already provides 90-mkinitcpio-install.hook which causes writes to usr/lib/modules/*/vmlinuz to trigger an initcpio rebuild.

Thus, at least for mkinitcpio, the following lines could be removed

12,13d11
<     elif [[ "$installed" =~ mkinitcpio ]] ; then
<         mkinitcpio -P

MrDuartePT commented on 2023-06-11 13:59 (UTC) (edited on 2023-06-11 14:01 (UTC) by MrDuartePT)

@Kathy is a good ideia but i will only not doit because some people like to patch the kernel and make lenovolegionlinux-dkms-git a dependency for lenovolegionlinux-git can cause problems.

Thanks for pointing out the error i will fix them now and update the commit

Sorry for the late replay.

lenovolegionlinux-git is still be a dependency because you need the tools in that package to make easy to interact with the kernel module

Kathy commented on 2023-05-22 03:44 (UTC)

Fix some errors. Maybe you could set lenovolegionlinux-git to be an opt-dependent of lenovolegionlinux-dkms-git, and then let lenovolegionlinux-git to depend on lenovolegionlinux-dkms-git.

# Maintainer: MrDuartePT <gonegrier.duarte@gmail.com>
# Maintainer: johnfanv2 <https://github.com/johnfanv2>
_pkgname=lenovolegionlinux
pkgname=${_pkgname}-dkms-git
pkgver=r301.a03d860
pkgrel=1
pkgdesc="LenovoLegionLinux (LLL) DKMS module"
arch=("any")
url="https://github.com/johnfanv2/LenovoLegionLinux"
license=('GPL')
makedepends=("git")
depends=(
    "dkms"
    "lm_sensors"
    "i2c-tools"
    "dmidecode"
)
optdepends=(
    "lenovolegionlinux-git: Brings additional drivers and tools for Lenovo Legion series laptops to Linux"
    "legion-fan-utils-linux-git: Systemd service that will apply a given profile"
)
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
}

MrDuartePT commented on 2023-05-04 06:28 (UTC)

@randomarch1867 is normal is never was meant to be optional because that package gave the required python app to use the kernel module.

randomarch1867 commented on 2023-05-03 23:38 (UTC)

The lenovolegionlinux-dkms-git still requires lenovolegionlinux-git as a dependency.

checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing lenovolegionlinux-git breaks dependency 'lenovolegionlinux-git' required by lenovolegionlinux-dkms-git
 -> exit status 1

yochananmarqos commented on 2023-04-28 18:49 (UTC)

@MrDuartePT: There are no ELF files in the package. Both DKMS and Python packages are architecture independent. See https://wiki.archlinux.org/title/Arch_package_guidelines#Architectures

MrDuartePT commented on 2023-04-28 12:25 (UTC)

@yochananmarqos i made the changes you point out except: The architecture is 'any' as there are no ELF files Do not use Pip, use Build and Install, see Python package guidelines

Im confuse why i need a ELF file because the AUR package build have the arch variable set to (x86_64) and this package is stated its only to be use in Lenovo Legion Laptop. The pip part need to be change upstream I need to see with maintainer how to the change (because using python setup.py install dosent install the python package corretly), if possible i will change the pkgbuild.

yochananmarqos commented on 2023-04-28 03:13 (UTC) (edited on 2023-04-28 03:21 (UTC) by yochananmarqos)

There are many things wrong with the PKGBUILD

  • The architecture is 'any' as there are no ELF files
  • Do not add base-devel to makedepends, it is assumed installed
  • Do not add linux-headers to makedepends, it's only optional dependency of dkms for a reason. See DKMS package guidelines
  • Dependencies are missing
  • Use a pkgver function to generate the pkgver, see VCS package guidlines
  • Do not use Pip, use Build and Install, see Python package guidelines
  • There is no reason to disable any makepkg.conf build options at all
  • Do not dump the whole repo into /usr/src/, only install or copy the needed files and folders
  • Do not install files in /usr/local/, see Arch package guidelines
  • The desktop file should be edited to only use the binary name and image name as they will be found in the proper locations
  • Desktop files, images, etc. should have 0644 permissions, they are not executable
  • Single icons belong in /usr/share/pixmaps/. Do not install them directly into /usr/share/icons/. Sized icons belong in /usr/share/icons/hicolor/${size}x${size}/apps
  • The ${pkgdir} variable must be quoted
  • Use install -d to create a folder with 0755 permissions, not mkdir -p. Using install -D creates the leading directory