add todo.txt-cli

This commit is contained in:
Gwenhael Le Moine 2011-12-04 10:24:32 +01:00
parent 22cf93c8e4
commit a088781461

View file

@ -0,0 +1,75 @@
#!/bin/sh -x
# variables
VERSION=${VERSION:-trunk_$(date +"%Y.%m.%d_%H.%M")}
BUILD=${BUILD:-1}
TAG=cyco
TMP=/tmp/$TAG
CWD=$(pwd)
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
ARCH=${ARCH:-$(uname -m)}
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM}
PREFIX=${PREFIX:-/usr}
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG
# mise en place
cd $TMP
if [ ! -e $REPOSITORY ] ; then
git clone https://github.com/ginatrapani/todo.txt-cli.git $REPOSITORY
else
( cd $REPOSITORY
git pull
)
fi
cp -R $REPOSITORY $TMP/
cd $TMP/$PRGNAM
make
mkdir -p $PKG$PREFIX/{bin/,doc/$PRGNAM/}
mv todo.sh $PKG$PREFIX/bin/
mv * $PKG$PREFIX/doc/$PRGNAM/
# correction
cd $PKG
chown -R root:root *
chmod +x $PKG$PREFIX/bin/*
# 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 (TODO.TXT Command Line Interface)
$PRGNAM:
$PRGNAM: A simple and extensible shell script for managing your todo.txt file.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://todotxt.com/
$PRGNAM:
EOF
# empaquetage
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz