wok rev 9845

Add: apache-mod-wsgi'
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sun May 15 23:51:51 2011 +0200 (2011-05-15)
parents b0d59f988747
children 6020e5c397e2
files apache-mod-wsgi/receipt apache-mod-wsgi/stuff/httpd-mod-wsgi.conf
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/apache-mod-wsgi/receipt	Sun May 15 23:51:51 2011 +0200
     1.3 @@ -0,0 +1,44 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="apache-mod-wsgi"
     1.7 +VERSION="3.3"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="Python WSGI adapter module for Apache."
    1.10 +MAINTAINER="erjo@slitaz.org"
    1.11 +WEB_SITE="http://code.google.com/p/modwsgi/"
    1.12 +SOURCE="mod_wsgi"
    1.13 +TARBALL="$SOURCE-$VERSION.tar.gz"
    1.14 +WGET_URL="http://modwsgi.googlecode.com/files/$TARBALL"
    1.15 +
    1.16 +DEPENDS="apache python"
    1.17 +BUILD_DEPENDS="apache apache-dev apr-dev apr-util-dev python-dev sed acl acl-dev"
    1.18 +
    1.19 +# Rules to configure and make the package.
    1.20 +compile_rules()
    1.21 +{
    1.22 +	./configure 
    1.23 +	sed -i -e "s!^DESTDIR =!DESTDIR = $WOK/$PACKAGE/install! " Makefile
    1.24 +	make && make install
    1.25 +}
    1.26 +
    1.27 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.28 +genpkg_rules()
    1.29 +{
    1.30 +	mkdir -p $fs/etc/apache/extra
    1.31 +	cp -a $install/* $fs
    1.32 +	cp $stuff/httpd-mod-wsgi.conf $fs/etc/apache/extra
    1.33 +}
    1.34 +
    1.35 +post_install()
    1.36 +{
    1.37 +		# Enable WSGI module
    1.38 +		echo "# Python WSGI module" >> $1/etc/apache/httpd.conf
    1.39 +		echo "Include /etc/apache/extra/httpd-mod-wsgi.conf  " >> $1/etc/apache/httpd.conf
    1.40 +}
    1.41 +
    1.42 +post_remove()
    1.43 +{
    1.44 +		# Remove WSGI configuration
    1.45 +		sed -i s/\# Python.*// $1/etc/apache/httpd.conf
    1.46 +		sed -i s/.*httpd-mod-wsgi.conf// $1/etc/apache/httpd.conf
    1.47 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/apache-mod-wsgi/stuff/httpd-mod-wsgi.conf	Sun May 15 23:51:51 2011 +0200
     2.3 @@ -0,0 +1,3 @@
     2.4 +# Enable Python WSGI adapter module for Apache.
     2.5 +#
     2.6 +LoadModule wsgi_module share/apache/modules/mod_wsgi.so