Skip to content

Commit

Permalink
Add msi-ec-dkms-git
Browse files Browse the repository at this point in the history
  • Loading branch information
honjow authored and honjow committed Mar 4, 2025
1 parent b0c49e2 commit 69ce1ca
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
51 changes: 51 additions & 0 deletions pkgs/msi-ec-dkms-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Maintainer: steelt <steeltitanium1 at gmail dot com>

_pkgbase=msi-ec
pkgname=msi-ec-dkms-git
pkgver=r415.f169e6a
pkgrel=1
pkgdesc="Driver for MSI laptop EC (DKMS)"
arch=('x86_64')
license=('GPL2')
url="https://github.com/BeardOverflow/msi-ec"
depends=('dkms')
makedepends=('git')
conflicts=("${_pkgbase}")
source=(
"git+https://github.com/BeardOverflow/msi-ec.git"
"dkms.conf"
"0001-Add-Claw-8.patch"
)
sha256sums=('SKIP'
'f2846d9e9b3734dbdeb41dafde34ec5b5fd2353732cb30cf2606ba89083e1875'
'f8a0afe098fe7856afd2a37d8eebe37e38361b35c3e8b87a524e7a16eb47acbb'
)

pkgver() {
cd ${_pkgbase}
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
cd ${_pkgbase}

local src
for src in "${source[@]}"; do
[[ $src = *.patch ]] || continue
patch -p1 < "${srcdir}"/$src
done
}

package() {
install -Dm644 dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

sed -e "s/@VERSION@/${pkgver}/" \
-i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

cd "${_pkgbase}"

install -Dm644 -t "${pkgdir}/usr/src/${_pkgbase}-${pkgver}" \
Makefile \
msi-ec.c \
ec_memory_configuration.h
}
7 changes: 7 additions & 0 deletions pkgs/msi-ec-dkms-git/dkms.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MAKE[0]="make TARGET=${kernelver}"
CLEAN="make clean"
PACKAGE_NAME="msi_ec"
PACKAGE_VERSION="@VERSION@"
BUILT_MODULE_NAME[0]="msi-ec"
DEST_MODULE_LOCATION[0]="/kernel/drivers/platform/x86"
AUTOINSTALL="yes"

0 comments on commit 69ce1ca

Please sign in to comment.