blob: ed4bcbf63681b638effa1b4b170c87cf3c62fa51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-3.0.0_beta4.ebuild,v 1.6 2003/11/14 11:43:07 seemant Exp $
DESCRIPTION="An Apache2 DSO providing an embedded Python interpreter"
HOMEPAGE="http://www.modpython.org/"
NEWP="`echo ${P} | sed -e 's|_beta|-BETA|'`"
S=${WORKDIR}/${NEWP}
SRC_URI="http://www.apache.org/dist/httpd/modpython/dev/${NEWP}.tgz"
DEPEND="dev-lang/python =net-www/apache-2*"
LICENSE="Apache-1.1"
KEYWORDS="~x86"
IUSE=""
SLOT="0"
src_unpack() {
unpack ${A} || die
cd ${S} || die
patch -p0 <${FILESDIR}/mod_python-3.0.0_beta4-destdir.diff || die
}
src_compile() {
./configure --with-apxs=/usr/sbin/apxs2 || die
make OPT="`apxs2 -q CFLAGS` -fPIC" || die
}
src_install() {
dodir /usr/lib/{apache2,apache2-extramodules}
make install DESTDIR=${D} || die
mv ${D}/usr/lib/apache2/${PN}.so ${D}/usr/lib/apache2-extramodules
rm -rf ${D}/usr/lib/apache2
insinto /etc/apache2/conf/modules.d
doins ${FILESDIR}/16_mod_python.conf
dodoc ${FILESDIR}/16_mod_python.conf README NEWS CREDITS COPYRIGHT
dohtml doc-html/*
}
pkg_postinst() {
einfo "To have Apache run python programs, please do the following:"
einfo "Edit /etc/conf.d/apache2 (/etc/conf.d/apache if you're using"
einfo "apache 1.x) and add \"-D PYTHON\""
einfo "That will setup Apache to load python when it starts."
einfo
einfo "If you're new to mod_python there's a manual and tutorial"
einfo "installed in /usr/share/doc/${P}/html/index.html."
}
|