86 lines
2 KiB
Bash
Executable file
86 lines
2 KiB
Bash
Executable file
#!/bin/sh -x
|
|
|
|
# variables
|
|
VERSION=1.0.1
|
|
BUILD=1
|
|
|
|
|
|
TAG=cyco
|
|
OUTPUT=/tmp
|
|
TMP=/tmp/$TAG
|
|
CWD=$(pwd)
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
REPOSITORY=/home/installs/SlackBuilds/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/*
|
|
|
|
cd ../tools/
|
|
mkdir -p $PKG/etc/pm/sleep.d/
|
|
fromdos < fsp_pm.sh > $PKG/etc/pm/sleep.d/fsp_pm.sh
|
|
chmod +x $PKG/etc/pm/sleep.d/*
|
|
)
|
|
|
|
# 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 $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|