diff options
Diffstat (limited to 'network/uwsgi/uwsgi.SlackBuild')
-rw-r--r-- | network/uwsgi/uwsgi.SlackBuild | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/network/uwsgi/uwsgi.SlackBuild b/network/uwsgi/uwsgi.SlackBuild index 4fe1fcfd5b..3f0b4fbb84 100644 --- a/network/uwsgi/uwsgi.SlackBuild +++ b/network/uwsgi/uwsgi.SlackBuild @@ -4,7 +4,7 @@ # Written by Audrius Kažukauskas <audrius@neutrino.lt> PRGNAM=uwsgi -VERSION=${VERSION:-1.0.4} +VERSION=${VERSION:-1.2.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -35,15 +35,15 @@ else LIBDIRSUFFIX="" fi -# Build Python 2.6 plugin. -PYTHON26=${PYTHON26:-yes} +# Build Python 2.x plugin. +PYTHON=${PYTHON:-yes} -# Set this to "yes" if you want to build a plugin for Python 3.2. Requires +# Set this to "yes" if you want to build a plugin for Python 3.x. Requires # python3 to be installed. -PYTHON32=${PYTHON32:-no} +PYTHON3=${PYTHON3:-no} -# Perl PSGI plugin is disabled for now, as it works only on -current. -PSGI=${PSGI:-no} +# Perl PSGI plugin. +PSGI=${PSGI:-yes} # Build Ruby Rack plugin. RACK=${RACK:-yes} @@ -66,7 +66,7 @@ find . \ # Create build config file. cat > buildconf/package.ini <<EOF [uwsgi] -inherit = default +inherit = base plugin_dir = /usr/lib$LIBDIRSUFFIX/uwsgi-$VERSION embedded_plugins = null EOF @@ -86,8 +86,7 @@ sed -i "s|= /usr|= $PKG/usr|" buildconf/package.ini PLUGINS="cache ping rpc fastrouter http ugreen signal syslog" # Decide which language plugins to build. -[ "$PYTHON26" = "yes" ] && PLUGINS="$PLUGINS python26" -[ "$PYTHON32" = "yes" ] && PLUGINS="$PLUGINS python32" +[ "$PYTHON" = "yes" ] && PLUGINS="$PLUGINS python" [ "$PSGI" = "yes" ] && PLUGINS="$PLUGINS psgi" [ "$RACK" = "yes" ] && PLUGINS="$PLUGINS rack" @@ -97,10 +96,16 @@ for PLUGIN in $PLUGINS ; do python uwsgiconfig.py --plugin plugins/$PLUGIN package done +# Use python3 to build plugin for it. +if [ "$PYTHON3" = "yes" ]; then + CFLAGS="$SLKCFLAGS" \ + python3 uwsgiconfig.py --plugin plugins/python package python3 +fi + # Create a few symlinks for automatic plugin loading. ( cd $PKG/usr/bin - [ "$PYTHON26" = "yes" ] && ln -sf uwsgi uwsgi_python26 || true - [ "$PYTHON32" = "yes" ] && ln -sf uwsgi uwsgi_python32 || true + [ "$PYTHON" = "yes" ] && ln -sf uwsgi uwsgi_python || true + [ "$PYTHON3" = "yes" ] && ln -sf uwsgi uwsgi_python3 || true [ "$PSGI" = "yes" ] && ln -sf uwsgi uwsgi_psgi || true [ "$RACK" = "yes" ] && ln -sf uwsgi uwsgi_rack || true ) |