# HG changeset patch # User Eric Joseph-Alexandre # Date 1305496311 -7200 # Node ID d996f3dd694e32f722918ef3e01ffb2102035325 # Parent b0d59f988747ad6472adb0aebdf7537c61b8f5e8 Add: apache-mod-wsgi' diff -r b0d59f988747 -r d996f3dd694e apache-mod-wsgi/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apache-mod-wsgi/receipt Sun May 15 23:51:51 2011 +0200 @@ -0,0 +1,44 @@ +# SliTaz package receipt. + +PACKAGE="apache-mod-wsgi" +VERSION="3.3" +CATEGORY="network" +SHORT_DESC="Python WSGI adapter module for Apache." +MAINTAINER="erjo@slitaz.org" +WEB_SITE="http://code.google.com/p/modwsgi/" +SOURCE="mod_wsgi" +TARBALL="$SOURCE-$VERSION.tar.gz" +WGET_URL="http://modwsgi.googlecode.com/files/$TARBALL" + +DEPENDS="apache python" +BUILD_DEPENDS="apache apache-dev apr-dev apr-util-dev python-dev sed acl acl-dev" + +# Rules to configure and make the package. +compile_rules() +{ + ./configure + sed -i -e "s!^DESTDIR =!DESTDIR = $WOK/$PACKAGE/install! " Makefile + make && make install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/etc/apache/extra + cp -a $install/* $fs + cp $stuff/httpd-mod-wsgi.conf $fs/etc/apache/extra +} + +post_install() +{ + # Enable WSGI module + echo "# Python WSGI module" >> $1/etc/apache/httpd.conf + echo "Include /etc/apache/extra/httpd-mod-wsgi.conf " >> $1/etc/apache/httpd.conf +} + +post_remove() +{ + # Remove WSGI configuration + sed -i s/\# Python.*// $1/etc/apache/httpd.conf + sed -i s/.*httpd-mod-wsgi.conf// $1/etc/apache/httpd.conf +} diff -r b0d59f988747 -r d996f3dd694e apache-mod-wsgi/stuff/httpd-mod-wsgi.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/apache-mod-wsgi/stuff/httpd-mod-wsgi.conf Sun May 15 23:51:51 2011 +0200 @@ -0,0 +1,3 @@ +# Enable Python WSGI adapter module for Apache. +# +LoadModule wsgi_module share/apache/modules/mod_wsgi.so