# SliTaz package receipt. PACKAGE="apache-mod-wsgi" VERSION="4.6.5" CATEGORY="network" SHORT_DESC="Python WSGI adapter module for Apache." MAINTAINER="erjo@slitaz.org" LICENSE="Apache" WEB_SITE="https://github.com/GrahamDumpleton/mod_wsgi" REPOLOGY="apmod:wsgi" TARBALL="$PACKAGE-$VERSION.tar.gz" WGET_URL="$WEB_SITE/archive/$VERSION.tar.gz" DEPENDS="apache python" BUILD_DEPENDS="acl acl-dev apache apache-dev apr-dev apr-util-dev python-dev sed" current_version() { wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \ sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q' } # Rules to configure and make the package. compile_rules() { ./configure --prefix=/usr && 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 -e s/\# Python.*// \ -e s/.*httpd-mod-wsgi.conf// \ "$1/etc/apache/httpd.conf" }