SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "apache-mod-wsgi"

# SliTaz package receipt.

PACKAGE="apache-mod-wsgi"
VERSION="5.0.0"
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"

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
    sed '/tag\//!d;s|.*tag/v*||;s|".*||;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"
}
6011 packages and 861676 files in cooking database (Sun Jun 8 00:51:35 2025)