2d3c96f8e7
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
75 lines
2 KiB
Bash
Executable file
75 lines
2 KiB
Bash
Executable file
#!/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/cycojesus/projets/packages/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
|
|
mkdir -p $(dirname $REPOSITORY)
|
|
svn checkout https://svn.torproject.org/svn/arm/trunk/ $REPOSITORY
|
|
fi
|
|
|
|
( cd $REPOSITORY
|
|
svn update
|
|
)
|
|
|
|
cp -R $REPOSITORY $TMP/
|
|
( cd $TMP/$PRGNAM
|
|
python ./setup.py install --root $PKG
|
|
)
|
|
|
|
# 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 (Terminal status monitor for Tor relays.)
|
|
$PRGNAM:
|
|
$PRGNAM: Command line application for monitoring Tor relays, providing real time
|
|
$PRGNAM: status information such as the current configuration, bandwidth usage,
|
|
$PRGNAM: message log, connections, etc. This uses a curses interface much like
|
|
$PRGNAM: 'top' does for system usage. The application is intended for
|
|
$PRGNAM: command-line aficionados, ssh connections, and anyone stuck with a tty
|
|
$PRGNAM: terminal for checking their relay's status.
|
|
$PRGNAM:
|
|
$PRGNAM: http://www.atagar.com/arm/
|
|
$PRGNAM:
|
|
EOF
|
|
|
|
# empaquetage
|
|
cd $PKG
|
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|