mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
network/mod_wsgi: Updated for version 3.1
This commit is contained in:
parent
2a693e3c85
commit
f51a7a5260
5 changed files with 42 additions and 10 deletions
|
@ -7,6 +7,5 @@ running on commodity web hosting services.
|
||||||
All major Python web frameworks/applications support mod_wsgi;
|
All major Python web frameworks/applications support mod_wsgi;
|
||||||
that means Django, Pylons, Turbogears, etcetera...
|
that means Django, Pylons, Turbogears, etcetera...
|
||||||
|
|
||||||
Before using mod_wsgi, stop apache and add the following to
|
You'll need to add the following line to your /etc/httpd/httpd.conf file:
|
||||||
your /etc/httpd/httpd.conf file:
|
Include /etc/httpd/mod_wsgi.conf
|
||||||
LoadModule wsgi_module lib/httpd/modules/mod_wsgi.so
|
|
||||||
|
|
15
network/mod_wsgi/doinst.sh
Normal file
15
network/mod_wsgi/doinst.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
config() {
|
||||||
|
NEW="$1"
|
||||||
|
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||||
|
# If there's no config file by that name, mv it over:
|
||||||
|
if [ ! -r $OLD ]; then
|
||||||
|
mv $NEW $OLD
|
||||||
|
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||||
|
# toss the redundant copy
|
||||||
|
rm $NEW
|
||||||
|
fi
|
||||||
|
# Otherwise, we leave the .new copy for the admin to consider...
|
||||||
|
}
|
||||||
|
|
||||||
|
config etc/httpd/mod_wsgi.conf.new
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
## Licensed under GNU GPL v2
|
## Licensed under GNU GPL v2
|
||||||
|
|
||||||
PRGNAM=mod_wsgi
|
PRGNAM=mod_wsgi
|
||||||
VERSION=2.0
|
VERSION=3.1
|
||||||
ARCH=${ARCH:-i486}
|
ARCH=${ARCH:-i486}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
@ -17,6 +17,11 @@ PKG=$TMP/package-$PRGNAM
|
||||||
OUTPUT=${OUTPUT:-/tmp}
|
OUTPUT=${OUTPUT:-/tmp}
|
||||||
|
|
||||||
# CFLAGS are automatically picked from Python
|
# CFLAGS are automatically picked from Python
|
||||||
|
if [ "$ARCH" = "x86_64" ]; then
|
||||||
|
LIBDIRSUFFIX="64"
|
||||||
|
else
|
||||||
|
LIBDIRSUFFIX=""
|
||||||
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -32,17 +37,26 @@ chmod -R u+w,go+r-w,a-s .
|
||||||
./configure
|
./configure
|
||||||
|
|
||||||
# libtool can't find shared Python library;
|
# libtool can't find shared Python library;
|
||||||
# there should be symlink to libpython in /usr/lib/python2.5/config
|
# there should be symlink to libpython in /usr/lib${LIBDIRSUFFIX}/python2.6/config
|
||||||
# see http://code.google.com/p/modwsgi/wiki/InstallationIssues
|
# see http://code.google.com/p/modwsgi/wiki/InstallationIssues
|
||||||
make LDFLAGS="-L/usr/lib"
|
make LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"
|
||||||
make install DESTDIR=$PKG
|
make install DESTDIR=$PKG
|
||||||
|
|
||||||
|
# Strip binaries:
|
||||||
|
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
||||||
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||||
|
|
||||||
|
mkdir -p $PKG/etc/httpd
|
||||||
|
sed "s%@baselibdir@%lib${LIBDIRSUFFIX}%" $CWD/mod_wsgi.conf > \
|
||||||
|
$PKG/etc/httpd/mod_wsgi.conf.new
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cp -a LICENCE README $PKG/usr/doc/$PRGNAM-$VERSION/
|
cp -a LICENCE README $PKG/usr/doc/$PRGNAM-$VERSION/
|
||||||
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
|
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||||
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||||
|
|
||||||
cd $PKG
|
cd $PKG
|
||||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
||||||
|
|
2
network/mod_wsgi/mod_wsgi.conf
Normal file
2
network/mod_wsgi/mod_wsgi.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Apache config for mod_wsgi
|
||||||
|
LoadModule wsgi_module @baselibdir@/httpd/modules/mod_wsgi.so
|
|
@ -1,8 +1,10 @@
|
||||||
PRGNAM="mod_wsgi"
|
PRGNAM="mod_wsgi"
|
||||||
VERSION="2.0"
|
VERSION="3.1"
|
||||||
HOMEPAGE="http://www.modwsgi.org"
|
HOMEPAGE="http://www.modwsgi.org"
|
||||||
DOWNLOAD="http://modwsgi.googlecode.com/files/mod_wsgi-2.0.tar.gz"
|
DOWNLOAD="http://modwsgi.googlecode.com/files/mod_wsgi-3.1.tar.gz"
|
||||||
MD5SUM="72e871d4fda1da33829ae3c7f3f2aeb6"
|
MD5SUM="f9aabdcd7a3f66a2319d10793477f9e9"
|
||||||
|
DOWNLOAD_x86_64=""
|
||||||
|
MD5SUM_x86_64=""
|
||||||
MAINTAINER="Adis Nezirovic"
|
MAINTAINER="Adis Nezirovic"
|
||||||
EMAIL="adis_at_linux.org.ba"
|
EMAIL="adis_at_linux.org.ba"
|
||||||
APPROVED="rworkman"
|
APPROVED="rworkman"
|
||||||
|
|
Loading…
Reference in a new issue