summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Hernández Blas <hba.nihilismus@gmail.com>2010-05-13 00:42:02 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:42:02 +0200
commitb1a51046dea92c1bbc161580f5ec0f6e437abe35 (patch)
tree17be274758e649c9cad935c697cccb7d768afee2
parent66b5b99cb920d0b08dba12df072d70e37837a350 (diff)
downloadslackbuilds-b1a51046dea92c1bbc161580f5ec0f6e437abe35.tar.gz
system/tp_smapi: Updated for version 0.40
-rw-r--r--system/tp_smapi/README20
-rw-r--r--system/tp_smapi/README.SLACKWARE21
-rw-r--r--system/tp_smapi/doinst.sh6
-rw-r--r--system/tp_smapi/modprobe.thinkpad_ec.conf (renamed from system/tp_smapi/modprobe.thinkpad_ec)0
-rw-r--r--system/tp_smapi/modprobe.tp_smapi.conf (renamed from system/tp_smapi/modprobe.tp_smapi)0
-rw-r--r--system/tp_smapi/tp_smapi.SlackBuild36
-rw-r--r--system/tp_smapi/tp_smapi.info4
7 files changed, 51 insertions, 36 deletions
diff --git a/system/tp_smapi/README b/system/tp_smapi/README
index f9b6b722bc..df6db4a52e 100644
--- a/system/tp_smapi/README
+++ b/system/tp_smapi/README
@@ -3,3 +3,23 @@ tp_smapi (SMAPI BIOS access for ThinkPad Laptops)
ThinkPad laptops include a proprietary interface called SMAPI BIOS
(System Management Application Program Interface) which provides some
hardware control functionality that is not accessible by other means.
+
+##############################################################################
+##############################################################################
+
+WARNING:
+This driver uses undocumented features and direct hardware access.
+It thus cannot be guaranteed to work, and may cause arbitrary damage
+(especially on models it wasn't tested on).
+
+##############################################################################
+##############################################################################
+
+To get a package for other kernel release, execute this SlackBuild as:
+ # KERNEL_VERS='2.6.31' ./tp_smapi.SlackBuild
+
+By default its going to be built for the output from $(uname -r)
+
+Finally, its highly recommended to read these sections in www.thinkwiki.org
+http://www.thinkwiki.org/wiki/Tp_smapi
+http://www.thinkwiki.org/wiki/Talk:Tp_smapi
diff --git a/system/tp_smapi/README.SLACKWARE b/system/tp_smapi/README.SLACKWARE
deleted file mode 100644
index 5763f2ea83..0000000000
--- a/system/tp_smapi/README.SLACKWARE
+++ /dev/null
@@ -1,21 +0,0 @@
-tp_smapi README.SLACKWARE
-
-===============================================================================
-
-WARNING:
-This driver uses undocumented features and direct hardware access.
-It thus cannot be guaranteed to work, and may cause arbitrary damage
-(especially on models it wasn't tested on).
-
-===============================================================================
-
-This package will overwrite the stock hdaps module in Slackware's default
-kernel-modules package, so if you remove this package and still need to use
-the hdaps module, you'll need to reinstall the kernel-modules package.
-
-Its highly recommended to read this sections in www.thinkwiki.org
-http://www.thinkwiki.org/wiki/Tp_smapi
-http://www.thinkwiki.org/wiki/Talk:Tp_smapi
-
-===============================================================================
-
diff --git a/system/tp_smapi/doinst.sh b/system/tp_smapi/doinst.sh
index f61efdf685..6510094161 100644
--- a/system/tp_smapi/doinst.sh
+++ b/system/tp_smapi/doinst.sh
@@ -1,2 +1,4 @@
-chroot . /sbin/depmod -a
-
+# Re-generate modules.dep and map files.
+if [ -x sbin/depmod ]; then
+ chroot . /sbin/depmod -a @KERNEL@ 1> /dev/null 2> /dev/null
+fi
diff --git a/system/tp_smapi/modprobe.thinkpad_ec b/system/tp_smapi/modprobe.thinkpad_ec.conf
index 6e9b47637e..6e9b47637e 100644
--- a/system/tp_smapi/modprobe.thinkpad_ec
+++ b/system/tp_smapi/modprobe.thinkpad_ec.conf
diff --git a/system/tp_smapi/modprobe.tp_smapi b/system/tp_smapi/modprobe.tp_smapi.conf
index 98080e9df6..98080e9df6 100644
--- a/system/tp_smapi/modprobe.tp_smapi
+++ b/system/tp_smapi/modprobe.tp_smapi.conf
diff --git a/system/tp_smapi/tp_smapi.SlackBuild b/system/tp_smapi/tp_smapi.SlackBuild
index 5d12f20ae2..483bcb847c 100644
--- a/system/tp_smapi/tp_smapi.SlackBuild
+++ b/system/tp_smapi/tp_smapi.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for tp_smapi
-# Copyright (c) 2008, Antonio Hernández Blas <hba.nihilismus@gmail.com>
+# Copyright (c) 2008-2009, Antonio Hernández Blas <hba.nihilismus@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
PRGNAM=tp_smapi
VERSION=0.40
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
KERNEL_VERS=${KERNEL_VERS:-"$(uname -r)"}
@@ -34,11 +34,15 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -59,8 +63,11 @@ find . \
make HDAPS=1 KVER=$KERNEL_VERS
-mkdir -p $PKG/lib/modules/${KERNEL_VERS}/kernel/drivers/{hwmon,firmware}
-install -m 0664 hdaps.ko $PKG/lib/modules/${KERNEL_VERS}/kernel/drivers/hwmon/
+mkdir -p $PKG/lib/modules/${KERNEL_VERS}/extra
+install -m 0664 hdaps.ko \
+ $PKG/lib/modules/${KERNEL_VERS}/extra/
+
+mkdir -p $PKG/lib/modules/${KERNEL_VERS}/kernel/drivers/firmware
install -m 0664 thinkpad_ec.ko tp_smapi.ko \
$PKG/lib/modules/${KERNEL_VERS}/kernel/drivers/firmware
@@ -69,22 +76,27 @@ install -m 0664 thinkpad_ec.ko tp_smapi.ko \
# We're not going to install these with a .new extension, because we don't
# want them to be present if the package is removed.
mkdir -p $PKG/etc/modprobe.d
-cat $CWD/modprobe.tp_smapi > $PKG/etc/modprobe.d/tp_smapi
-cat $CWD/modprobe.thinkpad_ec > $PKG/etc/modprobe.d/thinkpad_ec
+cat $CWD/modprobe.tp_smapi.conf > $PKG/etc/modprobe.d/tp_smapi.conf
+cat $CWD/modprobe.thinkpad_ec.conf > $PKG/etc/modprobe.d/thinkpad_ec.conf
+
+# Make hdaps kernel module from this package be prefered over hdaps in kernel-module package.
+mkdir -p $PKG/etc/depmod.d
+echo "override hdaps ${KERNEL_VERS} extra" > $PKG/etc/depmod.d/hdaps.conf
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGES README TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+sed "s%@KERNEL@%$KERNEL_VERS%" $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION\_$(echo ${KERNEL_VERS} | tr '-' '_')-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/tp_smapi/tp_smapi.info b/system/tp_smapi/tp_smapi.info
index eda99ea60e..e5165c994d 100644
--- a/system/tp_smapi/tp_smapi.info
+++ b/system/tp_smapi/tp_smapi.info
@@ -3,6 +3,8 @@ VERSION="0.40"
HOMEPAGE="http://tpctl.sourceforge.net"
DOWNLOAD="http://downloads.sourceforge.net/tpctl/tp_smapi-0.40.tgz"
MD5SUM="f4eb8bb4d4413a5ae65aa7d77f4112c0"
-MAINTAINER="Antonio Hernández Blas"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Antonio Hernández Blas"
EMAIL="hba.nihilismus@gmail.com"
APPROVED="rworkman"