aboutsummaryrefslogtreecommitdiff
path: root/accessibility/linuxwacom/linuxwacom.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/linuxwacom/linuxwacom.SlackBuild')
-rw-r--r--accessibility/linuxwacom/linuxwacom.SlackBuild43
1 files changed, 26 insertions, 17 deletions
diff --git a/accessibility/linuxwacom/linuxwacom.SlackBuild b/accessibility/linuxwacom/linuxwacom.SlackBuild
index 4b3a255a931fc..f0e5ccda0d7be 100644
--- a/accessibility/linuxwacom/linuxwacom.SlackBuild
+++ b/accessibility/linuxwacom/linuxwacom.SlackBuild
@@ -1,6 +1,7 @@
#!/bin/sh
# Slackware build script for The Linux Wacom Project
+
# Written by Menno Duursma <druiloor@zonnet.nl>
# This program is free software. It comes without any warranty.
@@ -10,28 +11,32 @@
# Modified by the SlackBuilds.org project.
PRGNAM=linuxwacom
-VERSION=${VERSION:-0.8.2_2}
+VERSION=${VERSION:-0.8.4_4}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Thanks to paul wisehart for sugesting this
-SRCVER=$(echo $VERSION | tr _ -)
+KERNEL=${KERNEL:-$(uname -r)}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
+OUTPUT=${OUTPUT:-/tmp}
+
+SRCVER=$(echo $VERSION | tr _ -)
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 # Exit on most errors
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -46,26 +51,30 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# build drivers (incl kernel module)
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure \
+./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --with-kernel=/lib/modules/${KERNEL}/source \
+ --with-linux=yes \
--enable-wacom \
- --with-linux=yes
+ --disable-static \
+ --build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
-# Make a destdir for the kernel module
-mkdir -p $PKG/lib/modules/$(uname -r)/kernel/drivers/usb/input
-
-# cut (extra) version from sourcedir name and copy the .ko
-cp src/$(uname -r | cut -d- -f1 | cut -d. -f1,2,3)/wacom.ko \
- $PKG/lib/modules/$(uname -r)/kernel/drivers/usb/input
+# Install the kernel module
+# Ignore the "2.6.28" in the path below; you can verify with
+# modinfo(8) if you don't trust me... ;-) --rworkman
+mkdir -p $PKG/lib/modules/${KERNEL}/kernel/drivers/usb/input
+install -m 0644 src/2.6.28/wacom.ko \
+ $PKG/lib/modules/${KERNEL}/kernel/drivers/usb/input
( cd $PKG/usr || exit 1
find . -type f | xargs file | grep -e "executable" -e "shared object" \
@@ -73,12 +82,12 @@ cp src/$(uname -r | cut -d- -f1 | cut -d. -f1,2,3)/wacom.ko \
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a [A-Z][A-Z]* ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS ChangeLog GPL README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+sed "s%@KERNEL@%$KERNEL%" $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-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}