From 643827d42de265c2c3b82b051366fccdfccbd3c6 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 4 Mar 2010 17:31:12 +0700 Subject: [PATCH] add --- .../xf86-input-plpevtch.SlackBuild | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 x/xf86-input-plpevtch/xf86-input-plpevtch.SlackBuild diff --git a/x/xf86-input-plpevtch/xf86-input-plpevtch.SlackBuild b/x/xf86-input-plpevtch/xf86-input-plpevtch.SlackBuild new file mode 100755 index 00000000..8fbd3e5e --- /dev/null +++ b/x/xf86-input-plpevtch/xf86-input-plpevtch.SlackBuild @@ -0,0 +1,90 @@ +#!/bin/sh -x + +# variables +TMP=/tmp +CWD=$(pwd) + +APP_NAME=$(basename $CWD) +PKG=$TMP/package-$APP_NAME + +VERSION=0.4.0 + +EXT=tar.xz + +DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README TODO" + +ARCH=$(uname -m) +BUILD=1cyco + +PREFIX=/usr + +SLCKFLAGS="-fPIC -O2" + +# nettoyage préalable +rm -fr $PKG $TMP/$APP_NAME-$VERSION + +mkdir -p $PKG + +# mise en place +if [ ! -e $CWD/xf86-input-plpevtch-$VERSION.tar.bz2 ] ; then + ( cd $CWD + wget -c http://download.plop.at/files/plpevtch/xf86-input-plpevtch-$VERSION.tar.gz + ) +fi + +cd $TMP +tar xf $CWD/xf86-input-plpevtch-$VERSION.tar.gz +cd $TMP/$APP_NAME-$VERSION + +patch -p1 -i $CWD/hacks.diff + +# configuration +CFLAGS="$SLCKFLAGS" \ +CPPFLAGS="$SLCKFLAGS" \ +./configure \ + --prefix=$PREFIX \ + --mandir=$PREFIX/man \ + --libdir=$PREFIX/lib$(echo "$ARCH" | grep -o "64") + +# compilation +make -j3 PREFIX=$PREFIX + +# installation +make install DESTDIR=$PKG + +# correction +cd $PKG +chown -R root:root * + +mkdir -p $PKG/usr/doc/$APP_NAME-$VERSION +cd $TMP/$APP_NAME-$VERSION +cp -R $DOCS $PKG/usr/doc/$APP_NAME-$VERSION + +[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; + +# Strip binaries +( 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 +) + + +# embaumement +mkdir -p $PKG/install +cat < $PKG/install/slack-desc +$APP_NAME: $APP_NAME (Xorg Evdev Touchscreen Driver) +$APP_NAME: +$APP_NAME: The plpevtch driver is an eventdevice driver for touchscreens under Xorg 7.x. +$APP_NAME: +$APP_NAME: +$APP_NAME: +$APP_NAME: +$APP_NAME: +$APP_NAME: +$APP_NAME: http://www.plop.at/en/touchscreen.html +$APP_NAME: +EOF + +# empaquetage +cd $PKG +makepkg -l y -c n $TMP/$APP_NAME-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD.txz