diff options
author | Audrius Kažukauskas <audrius@neutrino.lt> | 2010-10-24 22:23:54 -0400 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-10-25 07:55:11 -0500 |
commit | 8dabd065295cf4a710be07ae56e99336fe9a57f8 (patch) | |
tree | 0d57ff4109cfe5e7d09d004512010276d9de4600 /network/uwsgi/uwsgi.SlackBuild | |
parent | 1430391bcf9f3f8452049caa3e2cc71a524cf85a (diff) |
network/uwsgi: Added (fast Python WSGI server)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/uwsgi/uwsgi.SlackBuild')
-rw-r--r-- | network/uwsgi/uwsgi.SlackBuild | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/network/uwsgi/uwsgi.SlackBuild b/network/uwsgi/uwsgi.SlackBuild new file mode 100644 index 0000000000000..978dcd61f9d39 --- /dev/null +++ b/network/uwsgi/uwsgi.SlackBuild @@ -0,0 +1,67 @@ +#!/bin/sh + +# Slackware build script for uwsgi +# Written by Audrius Kažukauskas <audrius@neutrino.lt> + +PRGNAM=uwsgi +VERSION=${VERSION:-0.9.6.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -eu + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +python uwsgiconfig.py --build + +install -D -m 755 uwsgi $PKG/usr/bin/uwsgi +strip --strip-unneeded $PKG/usr/bin/uwsgi + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ChangeLog LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |