# ChangeLog for dev-python/mod_python
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/ChangeLog,v 1.49 2007/01/13 18:43:55 chtekk Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/ChangeLog,v 1.50 2007/01/15 19:59:55 chtekk Exp $
+
+ 15 Jan 2007; Luca Longinotti <chtekk@gentoo.org>
+ +files/16_mod_python.conf, -files/16_mod_python-r1.conf, metadata.xml,
+ mod_python-2.7.11.ebuild, mod_python-3.1.4-r1.ebuild,
+ mod_python-3.2.10.ebuild:
+ Cleanup.
13 Jan 2007; Luca Longinotti <chtekk@gentoo.org>
-files/16_mod_python.conf, -files/publisher-2.diff,
--- /dev/null
+<IfDefine PYTHON>
+ <IfModule !mod_python.c>
+ LoadModule python_module modules/mod_python.so
+ </IfModule>
+</IfDefine>
+
+<IfModule mod_python.c>
+#
+# Mod_python is a module that embeds the Python language interpreter
+# within the server, allowing Apache handlers to be written in Python.
+#
+
+# This will cause files beneath /home/httpd/htdocs with the extension .spam
+# to be handled by the Python script /home/httpd/htdocs/eggs.py
+#
+#<Directory /home/httpd/htdocs>
+# <IfModule mod_mime.c>
+# AddHandler python-program .spam
+# </IfModule>
+# PythonHandler eggs
+#</Directory>
+
+# This will cause all requests to the /python heirachy of your
+# webserver to be handled by the python script /path/to/myhandler.py
+#
+#<Location /python>
+# SetHandler python-program
+# PythonPath "sys.path + ['/path/to']"
+# PythonHandler myhandler
+#</Location>
+
+# This will cause all requests to the /python heirachy of your
+# webserver to be handled by mod_python's Publisher handler
+#
+#<Location /python>
+# SetHandler python-program
+# PythonHandler mod_python.publisher
+#</Location>
+
+</IfModule>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>python</herd>
<herd>apache</herd>
+<herd>python</herd>
<longdescription>
Mod_python is an Apache module that embeds the Python interpreter within
the server. With mod_python you can write web-based applications in Python
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-2.7.11.ebuild,v 1.5 2007/01/11 19:25:40 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-2.7.11.ebuild,v 1.6 2007/01/15 19:59:55 chtekk Exp $
-inherit python apache-module
+inherit python apache-module multilib
-DESCRIPTION="Python module for Apache 1.x, not for Apache 2.x"
-SRC_URI="mirror://apache/httpd/modpython/${P}.tgz"
-HOMEPAGE="http://www.modpython.org/"
+KEYWORDS="~amd64 x86"
+DESCRIPTION="An Apache1 module providing an embedded Python interpreter."
+HOMEPAGE="http://www.modpython.org/"
+SRC_URI="mirror://apache/httpd/modpython/${P}.tgz"
LICENSE="as-is"
-KEYWORDS="x86 ~amd64"
SLOT="0"
IUSE=""
-#APACHE1_MOD_CONF="16_${PN}-r1"
+DEPEND="dev-lang/python"
+RDEPEND="${DEPEND}"
+
+APACHE1_MOD_CONF="16_${PN}"
APACHE1_MOD_DEFINE="PYTHON"
DOCFILES="COPYRIGHT CREDITS NEWS README"
# because the last task (make depend) is somehow borked
echo 'echo "configure done"' >> configure
- sed -ie 's:OPT=:OPT=$(OPTFLAGS):' ${S}/src/Makefile.in
- sed -ie 's/\(\\"thread\\" in sys.builtin_module_names\)/int(\1)/' ${S}/configure
+ sed -ie 's:OPT=:OPT=$(OPTFLAGS):' "${S}/src/Makefile.in"
+ sed -ie 's/\(\\"thread\\" in sys.builtin_module_names\)/int(\1)/' "${S}/configure"
export OPTFLAGS="`/usr/sbin/apxs -q CFLAGS` -fPIC"
- econf --with-apxs=${APXS1}
+ econf --with-apxs=${APXS1} || die "econf failed"
- sed -ie 's:LIBEXECDIR=:LIBEXECDIR=${D}:' Makefile
- sed -ie 's:PY_STD_LIB=:PY_STD_LIB=${D}:' Makefile
- sed -ie 's:CFLAGS=$(OPT) $(INCLUDES):CFLAGS=$(OPT) $(INCLUDES) -DEAPI -O0:' ${S}/src/Makefile
+ sed -ie 's:LIBEXECDIR=:LIBEXECDIR=${D}:' "Makefile"
+ sed -ie 's:PY_STD_LIB=:PY_STD_LIB=${D}:' "Makefile"
+ sed -ie 's:CFLAGS=$(OPT) $(INCLUDES):CFLAGS=$(OPT) $(INCLUDES) -DEAPI -O0:' "${S}/src/Makefile"
emake || die "emake failed"
}
src_install() {
python_version
- PY_LIBPATH="/usr/lib/python${PYVER}"
-
- dodir ${APACHE1_MODULESDIR}
- dodir ${PY_LIBPATH}
+ PY_LIBPATH="/usr/$(get_libdir)/python${PYVER}"
+ dodir "${PY_LIBPATH}"
# compileall.py is needed or make install will fail
- cp ${PY_LIBPATH}/compileall.py ${D}${PY_LIBPATH}
- emake install || die
- rm ${D}${PY_LIBPATH}/compileall.py
+ cp -f "${PY_LIBPATH}/compileall.py" "${D}${PY_LIBPATH}/compileall.py"
+ emake DESTDIR="${D}" install || die "emake install failed"
+ rm -f "${D}${PY_LIBPATH}/compileall.py"
- insinto /usr/share/doc/${PF}/html
+ insinto "/usr/share/doc/${PF}/html"
doins -r doc-html/*
apache-module_src_install
- insinto ${APACHE1_MODULES_CONFDIR}
- newins ${FILESDIR}/16_${PN}-r1.conf 16_${PN}.conf
}
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-3.1.4-r1.ebuild,v 1.11 2007/01/11 19:25:40 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-3.1.4-r1.ebuild,v 1.12 2007/01/15 19:59:55 chtekk Exp $
-inherit python eutils apache-module autotools
+inherit python eutils apache-module multilib autotools
-DESCRIPTION="An Apache2 DSO providing an embedded Python interpreter"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86"
+
+DESCRIPTION="An Apache2 module providing an embedded Python interpreter."
HOMEPAGE="http://www.modpython.org/"
SRC_URI="mirror://apache/httpd/modpython/${P}.tgz"
-
LICENSE="Apache-1.1"
SLOT="0"
-KEYWORDS="alpha amd64 ia64 ppc sparc x86"
IUSE=""
+
DEPEND="dev-lang/python"
RDEPEND="${DEPEND}"
-#APACHE2_MOD_CONF="2.7.11/16_${PN}"
+APACHE2_MOD_CONF="16_${PN}"
APACHE2_MOD_DEFINE="PYTHON"
DOCFILES="README NEWS CREDITS COPYRIGHT"
need_apache2
src_unpack() {
- unpack ${A} || die "unpack failed"
- cd ${S} || die "cd \$S failed"
+ unpack ${A}
+ cd "${S}"
- # remove optimisations, we do that outside portage
- sed -ie 's:--optimize 2:--no-compile:' dist/Makefile.in
+ # Remove optimisations, we do that outside Portage
+ sed -ie 's:--optimize 2:--no-compile:' "dist/Makefile.in"
- # Fix compilation when using Python-2.3
- if has_version ">=dev-lang/python-2.3"; then
+ # Fix compilation when using Python 2.3 or newer
+ if has_version ">=dev-lang/python-2.3" ; then
sed -ie 's:LONG_LONG:PY_LONG_LONG:g' "${S}/src/requestobject.c"
fi
- # fix configure with bash 3.1
+ # Fix configure with Bash 3.1
epatch "${FILESDIR}/${P}-configure-bash-3.1.patch"
eautoconf
}
src_compile() {
- econf --with-apxs=${APXS2} || die
- emake OPT="`apxs2 -q CFLAGS` -fPIC" || die
+ econf --with-apxs=${APXS2} || die "econf failed"
+ emake OPT="`apxs2 -q CFLAGS` -fPIC" || die "emake failed"
}
src_install() {
- emake DESTDIR=${D} install || die
-
+ emake DESTDIR="${D}" install || die "emake install failed"
dohtml -r doc-html/*
-
apache-module_src_install
- insinto ${APACHE2_MODULES_CONFDIR}
- newins ${FILESDIR}/16_${PN}-r1.conf 16_${PN}.conf
}
pkg_postinst() {
python_version
- python_mod_optimize /usr/lib/python${PYVER}/site-packages/mod_python
+ python_mod_optimize "/usr/$(get_libdir)/python${PYVER}/site-packages/mod_python"
apache-module_pkg_postinst
}
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-3.2.10.ebuild,v 1.2 2007/01/11 19:25:40 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mod_python/mod_python-3.2.10.ebuild,v 1.3 2007/01/15 19:59:55 chtekk Exp $
-inherit python eutils apache-module autotools
+inherit python apache-module multilib autotools
-DESCRIPTION="An Apache2 DSO providing an embedded Python interpreter"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
+
+DESCRIPTION="An Apache2 module providing an embedded Python interpreter."
HOMEPAGE="http://www.modpython.org/"
SRC_URI="mirror://apache/httpd/modpython/${P}.tgz"
LICENSE="Apache-1.1"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
IUSE=""
+
DEPEND="dev-lang/python"
RDEPEND="${DEPEND}"
+APACHE2_MOD_CONF="16_${PN}"
APACHE2_MOD_DEFINE="PYTHON"
DOCFILES="README NEWS CREDITS COPYRIGHT"
need_apache2
src_unpack() {
- unpack ${A} || die "unpack failed"
- cd ${S} || die "cd \$S failed"
+ unpack ${A}
+ cd "${S}"
- # remove optimisations, we do that outside portage
- sed -ie 's:--optimize 2:--no-compile:' dist/Makefile.in
+ # Remove optimisations, we do that outside Portage
+ sed -ie 's:--optimize 2:--no-compile:' "dist/Makefile.in"
- # Fix compilation when using Python-2.3
- if has_version ">=dev-lang/python-2.3"; then
+ # Fix compilation when using Python 2.3 or newer
+ if has_version ">=dev-lang/python-2.3" ; then
sed -ie 's:LONG_LONG:PY_LONG_LONG:g' "${S}/src/requestobject.c"
fi
}
src_compile() {
- econf --with-apxs=${APXS2} || die
- emake OPT="`apxs2 -q CFLAGS` -fPIC" || die
+ econf --with-apxs=${APXS2} || die "econf failed"
+ emake OPT="`apxs2 -q CFLAGS` -fPIC" || die "econf failed"
}
src_install() {
- emake DESTDIR=${D} install || die
-
+ emake DESTDIR="${D}" install || die "emake install failed"
dohtml -r doc-html/*
-
apache-module_src_install
- insinto ${APACHE2_MODULES_CONFDIR}
- newins ${FILESDIR}/16_${PN}-r1.conf 16_${PN}.conf
}
pkg_postinst() {
python_version
- python_mod_optimize /usr/lib/python${PYVER}/site-packages/mod_python
+ python_mod_optimize "/usr/$(get_libdir)/python${PYVER}/site-packages/mod_python"
apache-module_pkg_postinst
}