add xap/tabbed

This commit is contained in:
Gwenhael Le Moine 2010-03-10 13:55:48 +07:00
parent a5090db2f8
commit 25378abd1d

90
xap/tabbed/tabbed.SlackBuild Executable file
View file

@ -0,0 +1,90 @@
#!/bin/sh -x
# variables
CWD=$(pwd)
PRGNAM=$(basename $(pwd))
BRANCH=
VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")}
ARCH=${ARCH:-$(uname -m)}
BUILD=1
PACKAGER=cyco
TMP=/tmp/$PACKAGER
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
REPOSITORIES=/home/cycojesus/projets/packages/repositories
DOCS="*.txt"
PREFIX=/usr
SLCKFLAGS=""
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
hg clone http://hg.suckless.org/tabbed $REPOSITORIES/$PRGNAM
else
( cd $REPOSITORIES/$PRGNAM
hg pull -u
)
fi
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG
# mise en place
cd $TMP
if [ -e $CWD/$PRGNAM-$VERSION.tar.?z* ] ; then
tar xf $CWD/$PRGNAM-$VERSION.tar.?z*
else
cp -R $REPOSITORIES/$PRGNAM $TMP/$PRGNAM-$VERSION
fi
cd $TMP/$PRGNAM-$VERSION
# configuration
# compilation
make -j3 PREFIX=$PREFIX
# installation
make install DESTDIR=$PKG PREFIX=$PREFIX MANPREFIX=$PREFIX/man
# correction
cd $PKG
chown -R root:root *
find $PKG -name \.hg\* -exec rm -fr {} \;
[ -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 <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM ()
$PRGNAM:
$PRGNAM: Simple generic tabbed fronted to xembed aware applications, originally
$PRGNAM: designed for surf but also usable with many other application, i.e. uzbl,
$PRGNAM: urxvt and xterm
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://tools.suckless.org/tabbed
$PRGNAM:
EOF
# empaquetage
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$PACKAGER.txz