wok view apache-mod-wsgi/receipt @ rev 21140
locale-*: update post_remove
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 25 20:50:34 2019 +0100 (2019-03-25) |
parents | 9e01bc6321ea |
children | e0d8b796f528 |
line source
1 # SliTaz package receipt.
3 PACKAGE="apache-mod-wsgi"
4 VERSION="3.4"
5 CATEGORY="network"
6 SHORT_DESC="Python WSGI adapter module for Apache."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="Apache"
9 WEB_SITE="https://github.com/GrahamDumpleton/mod_wsgi"
10 SOURCE="mod_wsgi"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WGET_URL="http://modwsgi.googlecode.com/files/$TARBALL"
14 DEPENDS="apache python"
15 BUILD_DEPENDS="apache apache-dev apr-dev apr-util-dev python-dev sed acl acl-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 ./configure
22 sed -i -e "s!^DESTDIR =!DESTDIR = $WOK/$PACKAGE/install! " Makefile
23 make && make install
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/etc/apache/extra
30 cp -a $install/* $fs
31 cp $stuff/httpd-mod-wsgi.conf $fs/etc/apache/extra
32 }
34 post_install()
35 {
36 # Enable WSGI module
37 echo "# Python WSGI module" >> "$1/etc/apache/httpd.conf"
38 echo "Include /etc/apache/extra/httpd-mod-wsgi.conf " >> "$1/etc/apache/httpd.conf"
39 }
41 post_remove()
42 {
43 # Remove WSGI configuration
44 sed -i s/\# Python.*// "$1/etc/apache/httpd.conf"
45 sed -i s/.*httpd-mod-wsgi.conf// "$1/etc/apache/httpd.conf"
46 }