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: it87-dkms-git #6237

Merged
merged 12 commits into from
Jul 17, 2024
1 change: 1 addition & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ insync-deb
intel-undervolt
intellij-idea-community-bin
internxt-deb
it87-dkms-git
ivpn-deb
ivpn-ui-deb
jellyfin-media-player-deb
Expand Down
19 changes: 19 additions & 0 deletions packages/it87-dkms-git/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pkgbase = it87-dkms-git
gives = it87
pkgver = 152
pkgdesc = Linux Driver for ITE LPC chips
url = https://github.com/frankcrawford/it87
arch = x86_64
arch = i686
depends = dkms
makedepends = git
provides = it87
maintainer = xdavius <[email protected]>
source = it87::git+https://github.com/frankcrawford/it87.git
source = dkms.conf
source = it87.conf
sha256sums = SKIP
sha256sums = f325b751c8a81416a75c2c1e7a7bc9ca46ae0fa3b44d4ccc09593274be1b2dc7
sha256sums = acdc488d1505e891ed6259b29428d4b27d26d18e3ea170f017b930390d6420e7

pkgname = it87-dkms-git
7 changes: 7 additions & 0 deletions packages/it87-dkms-git/dkms.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PACKAGE_NAME="@_PKGBASE@"
PACKAGE_VERSION="@PKGVER@"
MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules"
CLEAN="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build clean"
BUILT_MODULE_NAME[0]="@_PKGBASE@"
DEST_MODULE_LOCATION[0]="/kernel/drivers/hwmon"
AUTOINSTALL="yes"
63 changes: 63 additions & 0 deletions packages/it87-dkms-git/it87-dkms-git.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
pkgname="it87-dkms-git"
gives="it87"
pkgver="152"
pkgdesc="Linux Driver for ITE LPC chips"
arch=('x86_64' 'i686')
url='https://github.com/frankcrawford/it87'
depends=('dkms')
makedepends=('git')
provides=('it87')
source=("${gives}::git+https://github.com/frankcrawford/it87.git"
"dkms.conf"
"it87.conf")
sha256sums=('SKIP'
'f325b751c8a81416a75c2c1e7a7bc9ca46ae0fa3b44d4ccc09593274be1b2dc7'
'acdc488d1505e891ed6259b29428d4b27d26d18e3ea170f017b930390d6420e7')
maintainer=("xdavius <[email protected]>")

prepare() {
cd "${srcdir}/${gives}"
}
Xdavius marked this conversation as resolved.
Show resolved Hide resolved

package() {
cd "${srcdir}/${gives}"

install -d "${pkgdir}/usr/src/${gives}-${pkgver}/"
cp -r "${srcdir}/${gives}"/* "${pkgdir}/usr/src/${gives}-${pkgver}/"

install -Dm644 "${srcdir}/dkms.conf" "${pkgdir}/usr/src/${gives}-${pkgver}/dkms.conf"

sed -e "s/@_PKGBASE@/${gives}/" \
-e "s/@PKGVER@/${pkgver}/" \
-i "${pkgdir}/usr/src/${gives}-${pkgver}/dkms.conf"

install -Dm644 "${srcdir}/it87.conf" "${pkgdir}/usr/lib/depmod.d/it87.conf"
}

post_upgrade() {
update-initramfs -u -k all
}

post_install() {
set -e

Xdavius marked this conversation as resolved.
Show resolved Hide resolved
DKMS_NAME="${gives}"
DKMS_VERSION="${pkgver}"

dkms add -m "${DKMS_NAME}" -v "${DKMS_VERSION}"
dkms build -m "${DKMS_NAME}" -v "${DKMS_VERSION}"
dkms install -m "${DKMS_NAME}" -v "${DKMS_VERSION}" --force || true

update-initramfs -u -k all
}

pre_remove() {
set -e

Xdavius marked this conversation as resolved.
Show resolved Hide resolved
DKMS_NAME="${gives}"
DKMS_VERSION="${pkgver}"

dkms remove -m "${DKMS_NAME}" -v "${DKMS_VERSION}" --all || true

update-initramfs -u -k all
}
5 changes: 5 additions & 0 deletions packages/it87-dkms-git/it87.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# /usr/lib/depmod.d/it87.conf
#

search updates extramodules built-in
Loading