add a/fspc

This commit is contained in:
Gwenhael Le Moine 2010-10-09 15:56:11 +07:00
parent 5add2a846d
commit 2265c98331

79
a/fspc/fspc.SlackBuild Executable file
View file

@ -0,0 +1,79 @@
#!/bin/sh -x
# variables
VERSION=1.0.1
BUILD=1
PACKAGER=cyco
TMP=/tmp
CWD=$(pwd)
PRGNAM=$(basename $CWD)
PKG=$TMP/$PACKAGER/pkg-$PRGNAM
ARCH=$(uname -m)
REPOSITORY=/home/cycojesus/projets/packages/repositories/$PRGNAM
PREFIX=/usr
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG
# mise en place
cd $TMP
[ ! -e $CWD/fsp-lnxdrv-$VERSION-src.tar.gz ] && wget -c http://sourceforge.net/projects/fsp-lnxdrv/files/fsp-lnxdrv-src/$VERSION/fsp-lnxdrv-$VERSION-src.tar.gz/download -O $CWD/fsp-lnxdrv-$VERSION-src.tar.gz
tar xf $CWD/fsp-lnxdrv-$VERSION-src.tar.gz
mv release_$(echo $VERSION | tr . _) $PRGNAM-$VERSION
( cd $TMP/$PRGNAM-$VERSION/src
cd libfsp
make
cd ../fspc
sed -i 's|usr/local|usr|g' $(grep -l usr/local *)
./configure
make
mkdir -p $PKG$PREFIX/{bin,share/$PRGNAM}
cp fspc $PKG$PREFIX/bin/
cp -R pic fspcui.xrc $PKG$PREFIX/share/$PRGNAM
chmod +x $PKG$PREFIX/bin/*
)
# correction
( cd $PKG
chown -R root:root *
find $PKG$PREFIX/man -name "*.?" -type f -exec gzip -9 {} \;
)
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
$PRGNAM: $PRGNAM (Touchpad driver client GUI)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://fsp-lnxdrv.sourceforge.net/
$PRGNAM:
EOF
# empaquetage
cd $PKG
makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz