Package Details: lenovolegionlinux-dkms-git r255.e0a361f-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
Submitter: MrDuartePT
Maintainer: MrDuartePT (XenHat)
Last Packager: MrDuartePT
Votes: 8
Popularity: 0.22
First Submitted: 2023-04-28 00:06 (UTC)
Last Updated: 2024-11-23 10:30 (UTC)

Required by (1)

Sources (1)

Latest Comments

« First ‹ Previous 1 2

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