Package Details: tp_smapi-dkms 0.42-1

Git Clone URL: (read-only)
Package Base: tp_smapi-dkms
Description: DKMS controlled modules for ThinkPad's SMAPI functionality
Upstream URL:
Licenses: GPL
Conflicts: tp_smapi
Provides: tp_smapi=0
Submitter: TamCore
Maintainer: TamCore
Last Packager: TamCore
Votes: 47
Popularity: 0.809246
First Submitted: 2011-08-30 13:12
Last Updated: 2016-05-06 19:14

Dependencies (1)

Required by (7)

Sources (3)

Latest Comments

parazyd commented on 2015-12-20 17:23

Reported out of date. Calculated sums not correct anymore and patching fails.

socke commented on 2015-11-24 12:21

Have put the PKGBUILD and the install file in a pastebin for better readability:

socke commented on 2015-11-24 11:59

Improved PKGBUILD:
pkgdesc="DKMS controlled modules for ThinkPad's SMAPI functionality"

prepare() {
# patch Makefile for recent kernel module directory change
cd "${srcdir}/${_pkgname}-${_pkgname/_/-}-${pkgver}/"
patch -p2 < ${srcdir}/kbase.patch
sed -i 's/KVER/KERNELRELEASE/g' Makefile

cd "${srcdir}/${_pkgname}-${_pkgname/_/-}-${pkgver}/"

mkdir -p "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
cp -a {*.{h,c},Makefile} "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
cp ${srcdir}/dkms.conf "${pkgdir}/usr/src/${_pkgname}-${pkgver}"

In the dkms.conf set:

And in the install file remove all the -dkms suffixes:
post_install() {
DKMS=`which dkms 2>/dev/null`

echo ">>> DKMS: Module add, build, and install "

$DKMS add -m tp_smapi -v $ver
for kver in /usr/lib/modules/*
if test -e ${kver}/build
kver="`basename $kver`"

$DKMS build -m tp_smapi -v $ver -k $kver
$DKMS install -m tp_smapi -v $ver -k $kver

echo ">>> Updating kernel modules..."
depmod -a $kver

pre_upgrade() {

post_upgrade() {

pre_remove() {
DKMS=`which dkms 2>/dev/null`
echo ">>> DKMS: Module uninstall "

line=`$DKMS status -m tp_smapi`
if echo "$line" | grep -E 'added|built|installed'; then
version=`echo "$line" | sed "s/tp_smapi,\([^,]*\)[,:].*/\1/;t;d"`
$DKMS remove -m tp_smapi -v $version --all


post_remove() {
/sbin/depmod -a

Actually, the install file needs some more work to do: Since you are receiving the module version as a parameter, the first line (ver=) can be omitted.

TamCore commented on 2015-01-21 15:29

tp_smapi-ck is a static package. The module is built during makepkg and that's it. This package ships the complete source of the module and some instructions for dkms to build it. That's why this package works with every kernel and why I won't add a specific kernels headers as deps.

orschiro commented on 2015-01-21 11:50

I understand. I didn't know that this package is also meant for -ck users. I expected them to use tp_smapi-ck.

TamCore commented on 2015-01-21 10:25

> Doesn't everyone use the linux package as it provides the kernel?
Nope, for example if someone (like me) has only linux-ck{,-headers} installed, there's no linux{,-headers} present on the system.

orschiro commented on 2015-01-21 09:37


Thanks for your comment.

> even if they don't use the linux package

Doesn't everyone use the linux package as it provides the kernel?

How can it be an optional dependency only if it was required to have it installed in order to install this package?

TamCore commented on 2015-01-21 08:33

No, sorry. This would would require everyone to install linux-headers, even if they don't use the linux package. Also linux-headers is already listed as an optional dependency for dkms.

orschiro commented on 2015-01-20 22:42

Can you please add linux-headers as a dependency?


pright commented on 2013-07-10 04:00

master.tar.gz should be tp_smapi-master.tar.gz now.

TamCore commented on 2012-07-18 17:08

Why should we want this?

eworm commented on 2012-07-18 12:06

Any reason this is not arch=('any')?

felixonmars commented on 2012-07-08 00:40

This package may need to patch Makefile for recent kernel module directory change:

KBASE := /lib/modules/$(KERNELRELEASE)
KBASE := /usr/lib/modules/$(KERNELRELEASE)

asch commented on 2012-06-26 14:05

Please add line `provides=("tp_smapi=${pkgver%.*}")` to the pkgbuild. After this modification, it can be used as dependency by packages, that needs `tp_smapi`.

TamCore commented on 2012-05-26 12:58

Changed. Thanks!

Anonymous comment on 2012-05-26 12:48

This fails to build when invoked right after a kernel install. Needs the below patch:

--- dkms.conf.old 2011-08-30 18:36:08.000000000 +0530
+++ 2012-05-26 18:16:57.068802873 +0530
@@ -2,7 +2,7 @@

-MAKE="make HDAPS=1"
+MAKE="make KVER=${kernelver} HDAPS=1"
CLEAN="make clean"


mazieres commented on 2012-01-30 17:16

Doesn't build properly.

$ makepkg -si
==> ERROR: install file (('tp_smapi-dkms.install')) does not exist.

You have to change this line in PKGBUILD:


chenxiaolong commented on 2011-12-13 05:59

@TamCore: Could you modify your PKGBUILD to use the latest git snapshot, like in the 'tp_smapi' package (

It supports some of the newer laptops, such as the Lenovo w520/t520/t420, which the current release does not support.