Skip to content

Commit

Permalink
add: it87-dkms-git
Browse files Browse the repository at this point in the history
  • Loading branch information
Xdavius committed Jul 13, 2024
1 parent c1c88de commit 6ec954b
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 0 deletions.
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
depends = linux-headers-amd64
makedepends = git
provides = it87
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"
67 changes: 67 additions & 0 deletions packages/it87-dkms-git/it87-dkms-git.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
gives=it87
pkgname=it87-dkms-git
pkgver=152
pkgdesc="Linux Driver for ITE LPC chips"
arch=('x86_64' 'i686')
url='https://github.com/frankcrawford/it87'
depends=('dkms' 'linux-headers-amd64')
makedepends=('git')
provides=('it87')

source=("$gives::git+https://github.com/frankcrawford/it87.git"
"dkms.conf"
"it87.conf")

sha256sums=('SKIP'
'f325b751c8a81416a75c2c1e7a7bc9ca46ae0fa3b44d4ccc09593274be1b2dc7'
'acdc488d1505e891ed6259b29428d4b27d26d18e3ea170f017b930390d6420e7')

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

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

DKMS_NAME="it87"
DKMS_VERSION="152"

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

SRC_DKMS_NAME="it87"
SRC_INSTALLED=$(ls /usr/src/ | grep $SRC_DKMS_NAME)
DKMS_NAME=$(echo $SRC_INSTALLED | cut -d "-" -f1)
DKMS_VERSION=$(echo $SRC_INSTALLED | cut -d "-" -f2)

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

0 comments on commit 6ec954b

Please sign in to comment.