summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamCore2016-05-06 20:47:56 +0200
committerTamCore2016-05-06 21:13:25 +0200
commit2a2111876cd3fecc90e658563044501229e78ee0 (patch)
tree0b67ffeb1e28c7a2123184c177e6056a130c5425
parentef9e75447a7b2b2b17dc4b3ed0e5cd8bdfc0835e (diff)
downloadaur-2a2111876cd3fecc90e658563044501229e78ee0.tar.gz
v0.42
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD20
-rw-r--r--tp_smapi-dkms.install41
3 files changed, 24 insertions, 47 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 140cb4371ee..cc3410c3181 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sun Dec 20 17:36:01 UTC 2015
+# Fri May 6 18:47:46 UTC 2016
pkgbase = tp_smapi-dkms
pkgdesc = DKMS controlled modules for ThinkPad's SMAPI functionality
- pkgver = 0.41
- pkgrel = 8
+ pkgver = 0.42
+ pkgrel = 1
url = http://www.thinkwiki.org/wiki/Tp_smapi
install = tp_smapi-dkms.install
arch = any
@@ -12,10 +12,10 @@ pkgbase = tp_smapi-dkms
provides = tp_smapi=0
conflicts = tp_smapi
options = !strip
- source = https://github.com/x539/tp_smapi/archive/master.tar.gz
+ source = https://github.com/evgeni/tp_smapi/releases/download/tp-smapi%2F0.42/tp_smapi-0.42.tgz
source = dkms.conf
source = kbase.patch
- sha256sums = 6109f2ec379e064340e8e1f3a284c4a56c765fcfd9210acd8dea308c091b95b2
+ sha256sums = 7b8d9f488c3859805f1f292bf4d518cc5b32ebb69b0ebe96367d0852dd792d27
sha256sums = e2d3db8b9bd5c53cba1d702e36814ec56ef52dd37dfe8a03f58deb83c11c8bed
sha256sums = 4bcce516a9f3c486a934cfe6e3d3c92443833f4094ec008ce25264d1a5b66097
diff --git a/PKGBUILD b/PKGBUILD
index 8853862c086..819bfcf5a78 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=tp_smapi-dkms
-pkgver=0.41
-pkgrel=8
+pkgver=0.42
+pkgrel=1
pkgdesc="DKMS controlled modules for ThinkPad's SMAPI functionality"
arch=(any)
url="http://www.thinkwiki.org/wiki/Tp_smapi"
@@ -10,18 +10,22 @@ conflicts=('tp_smapi')
provides=("tp_smapi=${pkgver%.*}")
options=(!strip)
install='tp_smapi-dkms.install'
-source=('https://github.com/x539/tp_smapi/archive/master.tar.gz' 'dkms.conf' 'kbase.patch')
-sha256sums=('6109f2ec379e064340e8e1f3a284c4a56c765fcfd9210acd8dea308c091b95b2'
+source=("https://github.com/evgeni/tp_smapi/releases/download/tp-smapi%2F${pkgver}/tp_smapi-${pkgver}.tgz" 'dkms.conf' 'kbase.patch')
+sha256sums=('7b8d9f488c3859805f1f292bf4d518cc5b32ebb69b0ebe96367d0852dd792d27'
'e2d3db8b9bd5c53cba1d702e36814ec56ef52dd37dfe8a03f58deb83c11c8bed'
'4bcce516a9f3c486a934cfe6e3d3c92443833f4094ec008ce25264d1a5b66097')
+prepare() {
+ cd tp_smapi-${pkgver}
+ # patch Makefile for recent kernel module directory change
+ patch -p2 < "${srcdir}"/kbase.patch
+ msg2 "Patching dkms.conf"
+ sed -ri 's/^(PACKAGE_VERSION=).*/\1'${pkgver}'/g' "${srcdir}"/dkms.conf
+}
package()
{
- # patch Makefile for recent kernel module directory change
- patch -p1 < kbase.patch
-
mkdir -p "${pkgdir}"/usr/src/${pkgname}-${pkgver}
- cp -a tp_smapi-master/{*.{h,c},Makefile} "${pkgdir}"/usr/src/${pkgname}-${pkgver}
+ cp -a tp_smapi-${pkgver}/{*.{h,c},Makefile} "${pkgdir}"/usr/src/${pkgname}-${pkgver}
cp dkms.conf "${pkgdir}"/usr/src/${pkgname}-${pkgver}
sed -i 's/KVER/KERNELRELEASE/g' "${pkgdir}"/usr/src/${pkgname}-${pkgver}/Makefile
}
diff --git a/tp_smapi-dkms.install b/tp_smapi-dkms.install
index 58ec0988042..2b115737c1a 100644
--- a/tp_smapi-dkms.install
+++ b/tp_smapi-dkms.install
@@ -1,45 +1,18 @@
-ver=0.41
-post_install() {
- DKMS=`which dkms 2>/dev/null`
-
- echo ">>> DKMS: Module add, build, and install "
-
- $DKMS add -m tp_smapi-dkms -v $ver
- for kver in /usr/lib/modules/*
- do
- if test -e ${kver}/build
- then
- kver="`basename $kver`"
+# old version (without -$pkgrel): ${1%%-*}
+# new version (without -$pkgrel): ${2%%-*}
- $DKMS build -m tp_smapi-dkms -v $ver -k $kver
- $DKMS install -m tp_smapi-dkms -v $ver -k $kver
-
- echo ">>> Updating kernel modules..."
- depmod -a $kver
- fi
- done
+post_install() {
+ dkms install tp_smapi-dkms/${1%%-*}
}
pre_upgrade() {
- pre_remove
+ pre_remove ${2%%-*}
}
post_upgrade() {
- post_install
+ post_install ${1%%-*}
}
pre_remove() {
- DKMS=`which dkms 2>/dev/null`
- echo ">>> DKMS: Module uninstall "
-
- line=`$DKMS status -m tp_smapi-dkms`
- if echo "$line" | grep -E 'added|built|installed'; then
- version=`echo "$line" | sed "s/tp_smapi-dkms,\([^,]*\)[,:].*/\1/;t;d"`
- $DKMS remove -m tp_smapi-dkms -v $version --all
- fi
-
-}
-
-post_remove() {
- /sbin/depmod -a
+ dkms remove tp_smapi-dkms/${1%%-*} --all
}