diff options
Diffstat (limited to 'network/mod_wsgi')
-rw-r--r-- | network/mod_wsgi/README | 5 | ||||
-rw-r--r-- | network/mod_wsgi/doinst.sh | 15 | ||||
-rw-r--r-- | network/mod_wsgi/mod_wsgi.SlackBuild | 22 | ||||
-rw-r--r-- | network/mod_wsgi/mod_wsgi.conf | 2 | ||||
-rw-r--r-- | network/mod_wsgi/mod_wsgi.info | 8 |
5 files changed, 42 insertions, 10 deletions
diff --git a/network/mod_wsgi/README b/network/mod_wsgi/README index 7c6b90cc14..fa3c2825c8 100644 --- a/network/mod_wsgi/README +++ b/network/mod_wsgi/README @@ -7,6 +7,5 @@ running on commodity web hosting services. All major Python web frameworks/applications support mod_wsgi; that means Django, Pylons, Turbogears, etcetera... -Before using mod_wsgi, stop apache and add the following to -your /etc/httpd/httpd.conf file: - LoadModule wsgi_module lib/httpd/modules/mod_wsgi.so +You'll need to add the following line to your /etc/httpd/httpd.conf file: + Include /etc/httpd/mod_wsgi.conf diff --git a/network/mod_wsgi/doinst.sh b/network/mod_wsgi/doinst.sh new file mode 100644 index 0000000000..7deb2518db --- /dev/null +++ b/network/mod_wsgi/doinst.sh @@ -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 + diff --git a/network/mod_wsgi/mod_wsgi.SlackBuild b/network/mod_wsgi/mod_wsgi.SlackBuild index 04d4721c58..208e6548f1 100644 --- a/network/mod_wsgi/mod_wsgi.SlackBuild +++ b/network/mod_wsgi/mod_wsgi.SlackBuild @@ -6,7 +6,7 @@ ## Licensed under GNU GPL v2 PRGNAM=mod_wsgi -VERSION=2.0 +VERSION=3.1 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -17,6 +17,11 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} # CFLAGS are automatically picked from Python +if [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi set -e @@ -32,17 +37,26 @@ chmod -R u+w,go+r-w,a-s . ./configure # 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 -make LDFLAGS="-L/usr/lib" +make LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" 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 cp -a LICENCE README $PKG/usr/doc/$PRGNAM-$VERSION/ cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh 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} diff --git a/network/mod_wsgi/mod_wsgi.conf b/network/mod_wsgi/mod_wsgi.conf new file mode 100644 index 0000000000..962ccaa7c0 --- /dev/null +++ b/network/mod_wsgi/mod_wsgi.conf @@ -0,0 +1,2 @@ +# Apache config for mod_wsgi +LoadModule wsgi_module @baselibdir@/httpd/modules/mod_wsgi.so diff --git a/network/mod_wsgi/mod_wsgi.info b/network/mod_wsgi/mod_wsgi.info index 0d4d5a01b3..807c57cfd7 100644 --- a/network/mod_wsgi/mod_wsgi.info +++ b/network/mod_wsgi/mod_wsgi.info @@ -1,8 +1,10 @@ PRGNAM="mod_wsgi" -VERSION="2.0" +VERSION="3.1" HOMEPAGE="http://www.modwsgi.org" -DOWNLOAD="http://modwsgi.googlecode.com/files/mod_wsgi-2.0.tar.gz" -MD5SUM="72e871d4fda1da33829ae3c7f3f2aeb6" +DOWNLOAD="http://modwsgi.googlecode.com/files/mod_wsgi-3.1.tar.gz" +MD5SUM="f9aabdcd7a3f66a2319d10793477f9e9" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" MAINTAINER="Adis Nezirovic" EMAIL="adis_at_linux.org.ba" APPROVED="rworkman" |