slackbuilds/d/tornado/tornado.SlackBuild
Gwenhael Le Moine 2c99795a7c https fails if certificates aren't there
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2012-01-11 11:15:38 +01:00

62 lines
1.5 KiB
Bash
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +%Y.%m.%d_%H.%M)
BUILD=1
ARCH=$(uname -m)
REPOSITORIES=/home/installs/SlackBuilds/repositories
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
if [ ! -e $REPOSITORIES/$PRGNAM ]; then
git clone http://github.com/facebook/tornado.git $REPOSITORIES/$PRGNAM
else
( cd $REPOSITORIES/$PRGNAM
git pull
)
fi
mkdir -p $TMP
cd $TMP
rm -fr $PRGNAM-$VERSION && cp -R $REPOSITORIES/$PRGNAM $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
python setup.py build
python setup.py install --root=$PKG
cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (Web server and tools)
$PRGNAM:
$PRGNAM: Tornado is an open source version of the scalable, non-blocking web server
$PRGNAM: and and tools that power FriendFeed. Documentation and downloads are
$PRGNAM: available at http://www.tornadoweb.org/
$PRGNAM:
$PRGNAM: Tornado is licensed under the Apache Licence, Version 2.0
$PRGNAM: (http://www.apache.org/licenses/LICENSE-2.0.html).
$PRGNAM:
$PRGNAM:
$PRGNAM:
EOF
chown -R root:root *
[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
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
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz