summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@gentoo.org>2007-10-22 13:41:40 +0000
committerGunnar Wrobel <wrobel@gentoo.org>2007-10-22 13:41:40 +0000
commit02bf84ad37dae5236578508b40a64e4a4ff36123 (patch)
tree8a17a4cf341d13fe8496729de5f0ad35c6257500 /eclass
downloadkolab-02bf84ad37dae5236578508b40a64e4a4ff36123.tar.gz
kolab-02bf84ad37dae5236578508b40a64e4a4ff36123.tar.bz2
kolab-02bf84ad37dae5236578508b40a64e4a4ff36123.zip
Clean up the structure.
svn path=/overlay/; revision=2770
Diffstat (limited to 'eclass')
-rw-r--r--eclass/horde-kolab-r1.eclass119
-rw-r--r--eclass/horde-kolab-r2.eclass125
-rw-r--r--eclass/horde-kolab-r4.eclass221
-rw-r--r--eclass/horde-kolab.eclass112
-rw-r--r--eclass/php-pear-manylibs-r1.eclass82
5 files changed, 659 insertions, 0 deletions
diff --git a/eclass/horde-kolab-r1.eclass b/eclass/horde-kolab-r1.eclass
new file mode 100644
index 0000000..1891b73
--- /dev/null
+++ b/eclass/horde-kolab-r1.eclass
@@ -0,0 +1,119 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/horde.eclass,v 1.33 2006/03/09 23:35:52 vapier Exp $
+#
+# Help manage the horde project http://www.horde.org/
+#
+# Author: Mike Frysinger <vapier@gentoo.org>
+# CVS additions by Chris Aniszczyk <zx@mea-culpa.net>
+# SNAP additions by Jonathan Polansky <jpolansky@lsit.ucsb.edu>
+#
+# This eclass provides generic functions to make the writing of horde
+# ebuilds fairly trivial since there are many horde applications and
+# they all share the same basic install process.
+
+# EHORDE_SNAP
+# This variable tracks whether the user is using a snapshot version
+#
+# EHORDE_SNAP_BRANCH
+# You set this via the ebuild to whatever branch you wish to grab a
+# snapshot of. Typically this is 'HEAD' or 'RELENG'.
+#
+# EHORDE_CVS
+# This variable tracks whether the user is using a cvs version
+
+inherit eutils
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
+
+[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/-kolab}" && HORDE_PN="${HORDE_PN/horde-}"
+[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
+
+SRC_URI="http://build.pardus.de/downloads/${P}.tar.gz"
+S=${WORKDIR}/${HORDE_PN}
+HOMEPAGE="http://www.horde.org/${HORDE_PN}"
+
+LICENSE="LGPL-2"
+
+# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
+INSTALL_DIR="/horde"
+[[ ${HORDE_PN} != "horde" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
+
+horde-kolab-r1_pkg_setup() {
+
+ if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
+ local param
+ if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
+ param="-o"
+ HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
+ fi
+ if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
+ echo
+ if [[ ${param} == "-o" ]] ; then
+ eerror "You MUST re-emerge php with at least one of"
+ else
+ eerror "You MUST re-emerge php with all of"
+ fi
+ eerror "the following options in your USE:"
+ eerror " ${HORDE_PHP_FEATURES}"
+ die "current php install cannot support ${HORDE_PN}"
+ fi
+ fi
+}
+
+horde-kolab-r1_src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ [[ -f test.php ]] && chmod 000 test.php
+ [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
+
+ cd config
+
+ for f in *.dist; do cp $f `basename $f .dist`; done
+
+ if [[ -n ${HORDE_KOLAB_CONFIG} ]]; then
+ for FILE in ${HORDE_KOLAB_CONFIG}
+ do
+ cp ${FILESDIR}/${FILE} ${FILE/_${P}.config/}
+ done
+ fi
+
+ cd ..
+}
+
+horde-kolab-r1_src_install() {
+
+ local destdir=/var/www/kolab/htdocs/horde
+ [[ ${HORDE_PN} != "horde" ]] && destdir=/var/www/kolab/htdocs/horde/${HORDE_PN}
+ [[ -n ${HORDE_BASEDIR} ]] && destdir=/var/www/kolab/htdocs/horde${HORDE_BASEDIR}
+
+ # Install docs and then delete them (except for CREDITS which
+ # many horde apps include in their help page #121003)
+ dodoc README docs/*
+ mv docs/CREDITS "${T}"/
+ rm -rf COPYING LICENSE README docs/*
+ mv "${T}"/CREDITS docs/
+
+ dodir ${destdir}
+ cp -r . ${D}/${destdir}/ || die "install files"
+
+ chown -R apache\: ${D}/${destdir}/config
+
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ insinto /etc/kolab/templates
+ doins ${HORDE_KOLAB_TEMPLATES}
+ fi
+
+}
+
+horde-kolab-r1_pkg_postinst() {
+ if [[ -e ${ROOT}/usr/share/doc/${PF}/INSTALL.gz ]] ; then
+ einfo "Please read /usr/share/doc/${PF}/INSTALL.gz"
+ fi
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ einfo
+ einfo "This package adds configuration templates into /etc/kolab/templates."
+ elog "After installing/updating this package you MUST run kolabconf!"
+ fi
+}
diff --git a/eclass/horde-kolab-r2.eclass b/eclass/horde-kolab-r2.eclass
new file mode 100644
index 0000000..10ad173
--- /dev/null
+++ b/eclass/horde-kolab-r2.eclass
@@ -0,0 +1,125 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/horde.eclass,v 1.33 2006/03/09 23:35:52 vapier Exp $
+#
+# Help manage the horde project http://www.horde.org/
+#
+# Author: Mike Frysinger <vapier@gentoo.org>
+# CVS additions by Chris Aniszczyk <zx@mea-culpa.net>
+# SNAP additions by Jonathan Polansky <jpolansky@lsit.ucsb.edu>
+#
+# This eclass provides generic functions to make the writing of horde
+# ebuilds fairly trivial since there are many horde applications and
+# they all share the same basic install process.
+
+# EHORDE_SNAP
+# This variable tracks whether the user is using a snapshot version
+#
+# EHORDE_SNAP_BRANCH
+# You set this via the ebuild to whatever branch you wish to grab a
+# snapshot of. Typically this is 'HEAD' or 'RELENG'.
+#
+# EHORDE_CVS
+# This variable tracks whether the user is using a cvs version
+
+inherit eutils
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
+
+[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/-kolab}" && HORDE_PN="${HORDE_PN/horde-}"
+[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
+
+SRC_DATE="${PV:0:4}-${PV:4:2}-${PV:6:2}"
+
+SRC_URI="http://build.pardus.de/downloads/${HORDE_PN}-HEAD-${SRC_DATE}.tar.gz"
+S=${WORKDIR}/${HORDE_PN}
+HOMEPAGE="http://www.horde.org/${HORDE_PN}"
+
+LICENSE="LGPL-2"
+SLOT="0"
+
+# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
+INSTALL_DIR="/horde"
+[[ ${HORDE_PN} != "horde" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
+
+horde-kolab-r2_pkg_setup() {
+
+ if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
+ local param
+ if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
+ param="-o"
+ HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
+ fi
+ if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
+ echo
+ if [[ ${param} == "-o" ]] ; then
+ eerror "You MUST re-emerge php with at least one of"
+ else
+ eerror "You MUST re-emerge php with all of"
+ fi
+ eerror "the following options in your USE:"
+ eerror " ${HORDE_PHP_FEATURES}"
+ die "current php install cannot support ${HORDE_PN}"
+ fi
+ fi
+}
+
+horde-kolab-r2_src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ [[ -f test.php ]] && chmod 000 test.php
+ [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
+
+ cd config
+
+ for f in *.dist; do cp $f `basename $f .dist`; done
+
+ if [[ -n ${HORDE_KOLAB_CONFIG} ]]; then
+ for FILE in ${HORDE_KOLAB_CONFIG}
+ do
+ cp ${FILESDIR}/${FILE} ${FILE/_${P}.config/}
+ done
+ fi
+
+ cd ..
+}
+
+horde-kolab-r2_src_install() {
+
+ local destdir=/var/www/kolab/htdocs/horde
+ [[ ${HORDE_PN} != "horde" ]] && destdir=/var/www/kolab/htdocs/horde/${HORDE_PN}
+ [[ -n ${HORDE_BASEDIR} ]] && destdir=/var/www/kolab/htdocs/horde${HORDE_BASEDIR}
+
+ # Install docs and then delete them (except for CREDITS which
+ # many horde apps include in their help page #121003)
+ dodoc README docs/*
+ mv docs/CREDITS "${T}"/
+ rm -rf COPYING LICENSE README docs/*
+ mv "${T}"/CREDITS docs/
+
+ dodir ${destdir}
+ cp -r . ${D}/${destdir}/ || die "install files"
+
+ chown -R apache\: ${D}/${destdir}/config
+
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ dodir /etc/kolab/templates
+ for TEMPLATE in ${HORDE_KOLAB_TEMPLATES}
+ do
+ cp ${FILESDIR}/${TEMPLATE} ${D}/etc/kolab/templates/${TEMPLATE/-${PV}/}
+ done
+ fi
+
+}
+
+horde-kolab-r2_pkg_postinst() {
+ if [[ -e ${ROOT}/usr/share/doc/${PF}/INSTALL.gz ]] ; then
+ einfo "Please read /usr/share/doc/${PF}/INSTALL.gz"
+ fi
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ einfo
+ einfo "This package adds configuration templates into /etc/kolab/templates."
+ elog "After installing/updating this package you MUST run kolabconf!"
+ fi
+}
diff --git a/eclass/horde-kolab-r4.eclass b/eclass/horde-kolab-r4.eclass
new file mode 100644
index 0000000..862505f
--- /dev/null
+++ b/eclass/horde-kolab-r4.eclass
@@ -0,0 +1,221 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/horde.eclass,v 1.33 2006/03/09 23:35:52 vapier Exp $
+#
+# Help manage the horde project http://www.horde.org/
+#
+# Author: Mike Frysinger <vapier@gentoo.org>
+# CVS additions by Chris Aniszczyk <zx@mea-culpa.net>
+# SNAP additions by Jonathan Polansky <jpolansky@lsit.ucsb.edu>
+#
+# This eclass provides generic functions to make the writing of horde
+# ebuilds fairly trivial since there are many horde applications and
+# they all share the same basic install process.
+
+# EHORDE_SNAP
+# This variable tracks whether the user is using a snapshot version
+#
+# EHORDE_SNAP_BRANCH
+# You set this via the ebuild to whatever branch you wish to grab a
+# snapshot of. Typically this is 'HEAD' or 'RELENG'.
+#
+# EHORDE_CVS
+# This variable tracks whether the user is using a cvs version
+
+inherit webapp eutils
+[[ ${PN} != ${PN/-cvs} ]] && inherit cvs
+
+IUSE="vhosts"
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
+
+[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/-kolab}" && HORDE_PN="${HORDE_PN/horde-}"
+[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
+
+EHORDE_CVS="false"
+EHORDE_SNAP="false"
+if [[ ${PN} != ${PN/-cvs} ]] ; then
+ EHORDE_CVS="true"
+ HORDE_PN=${HORDE_PN/-cvs}
+
+ ECVS_SERVER="anoncvs.horde.org:/repository"
+ ECVS_MODULE="${HORDE_PN}"
+ ECVS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cvs-src/${PN}"
+ ECVS_USER="cvsread"
+ ECVS_PASS="horde"
+
+ SRC_URI=""
+ S=${WORKDIR}/${HORDE_PN}
+
+elif [[ ${PN} != ${PN/-snap} ]] ; then
+ EHORDE_SNAP="true"
+ EHORDE_SNAP_BRANCH=${EHORDE_SNAP_BRANCH:-HEAD}
+ SNAP_PV=${PV:0:4}-${PV:4:2}-${PV:6:2}
+
+ HORDE_PN=${HORDE_PN/-snap}
+
+ SRC_URI="http://ftp.horde.org/pub/snaps/${SNAP_PV}/${HORDE_PN}-${EHORDE_SNAP_BRANCH}-${SNAP_PV}.tar.gz"
+ S=${WORKDIR}/${HORDE_PN}
+
+else
+ SRC_URI="http://ftp.horde.org/pub/${HORDE_PN}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}.tar.gz"
+ S=${WORKDIR}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}
+fi
+HOMEPAGE="http://www.horde.org/${HORDE_PN}"
+
+LICENSE="LGPL-2"
+
+# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
+INSTALL_DIR="/horde"
+[[ ${HORDE_PN} != "horde" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
+
+horde-kolab-r4_pkg_setup() {
+ webapp_pkg_setup
+
+ if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
+ local param
+ if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
+ param="-o"
+ HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
+ fi
+ if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
+ echo
+ if [[ ${param} == "-o" ]] ; then
+ eerror "You MUST re-emerge php with at least one of"
+ else
+ eerror "You MUST re-emerge php with all of"
+ fi
+ eerror "the following options in your USE:"
+ eerror " ${HORDE_PHP_FEATURES}"
+ die "current php install cannot support ${HORDE_PN}"
+ fi
+ fi
+
+ if use kolab && ! use vhosts ; then
+ ewarn "You are installing Horde for Kolab and disabled the \"vhosts\""
+ ewarn "USE flag. This is not recommended since Horde will end up"
+ ewarn "in /var/www/localhost rather than /var/www/kolab. You should"
+ ewarn "use this combination of USE flags only if you know what"
+ ewarn "you are doing."
+ fi
+}
+
+horde-kolab-r4_src_unpack() {
+ if [[ ${EHORDE_CVS} = "true" ]] ; then
+ cvs_src_unpack
+ else
+ unpack ${A}
+ fi
+ cd "${S}"
+
+ [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
+
+ cd config
+
+ for f in *.dist; do cp $f `basename $f .dist`; done
+
+ if use kolab ; then
+ if [[ -n ${HORDE_KOLAB_CONFIG} ]]; then
+ for FILE in ${HORDE_KOLAB_CONFIG}
+ do
+ cp "${FILESDIR}"/${FILE} ${FILE/_${PV}.config/}
+ done
+ fi
+ fi
+
+ cd ..
+}
+
+horde-kolab-r4_src_install() {
+ webapp_src_preinst
+
+ local destdir=${MY_HTDOCSDIR}
+ local my_d="${D}"/${destdir}/
+
+ # Work-around when dealing with CVS sources
+ [[ ${EHORDE_CVS} = "true" ]] && cd ${HORDE_PN}
+
+ # Install docs and then delete them (except for CREDITS which
+ # many horde apps include in their help page #121003)
+ dodoc README docs/*
+
+ dodir ${destdir}
+
+ if use kolab ; then
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ dodir /etc/kolab/templates
+ for TEMPLATE in ${HORDE_KOLAB_TEMPLATES}
+ do
+ cp "${FILESDIR}"/${TEMPLATE} "${D}"/etc/kolab/templates/${TEMPLATE/-${PV}/}
+ done
+ fi
+ fi
+
+ cp -r . "${my_d}" || die "install files"
+ mv "${my_d}"/docs/CREDITS "${T}"/
+ rm -rf "${my_d}"/COPYING "${my_d}"/LICENSE "${my_d}"/README "${my_d}"/docs/*
+ mv "${T}"/CREDITS "${my_d}"/docs/
+
+ [[ -f "${my_d}"/test.php ]] && rm "${my_d}"/test.php
+
+ webapp_serverowned "${MY_HTDOCSDIR}"/config
+
+ webapp_src_install
+}
+
+horde-kolab-r4_pkg_postinst() {
+ if [[ -e ${ROOT}/usr/share/doc/${PF}/INSTALL.gz ]] ; then
+ einfo "Please read /usr/share/doc/${PF}/INSTALL.gz"
+ fi
+ if ! use kolab; then
+ einfo "Before this package will work, you have to finalize"
+ einfo "the configuration files. Please review the"
+ einfo "config/ subdirectory of ${HORDE_PN} in the webroot."
+ if [[ ${HORDE_PN} != "horde" ]] ; then
+ ewarn
+ ewarn "Make sure ${HORDE_PN} is accounted for in horde's root"
+ ewarn " config/registry.php"
+ fi
+ fi
+ if [[ ${EHORDE_CVS} = "true" ]] ; then
+ ewarn
+ ewarn "Use these CVS versions at your own risk."
+ ewarn "They tend to break things when working with"
+ ewarn "the non CVS versions of horde."
+ fi
+ if use vhosts ; then
+ echo
+ ewarn "When installing horde into a vhost dir, you will"
+ ewarn "need to use the -d option so that it is installed"
+ ewarn "into the proper location."
+ if use kolab ; then
+ echo
+ ewarn "In order to install Horde for Kolab you are advised"
+ ewarn "to install the Horde packages into the host \"kolab\""
+ ewarn "by using the option \"-h kolab\" when installing the"
+ ewarn "Horde packages with webapp-config."
+ ewarn "Install the base horde package with"
+ ewarn
+ ewarn "webapp-config -I -h kolab -d horde horde-kolab VERSION"
+ ewarn
+ ewarn "followed by"
+ ewarn
+ ewarn "webapp-config -I -h kolab -d horde/APP APP-kolab VERSION"
+ ewarn
+ ewarn "for every other of the APPs possible (imp, turba, kronolith etc.)"
+ ewarn
+ ewarn "If you install into a different host or location you should"
+ ewarn "ensure that your fix you apache configuration accordingly."
+ fi
+ fi
+ if use kolab ; then
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ einfo
+ einfo "This package adds configuration templates into /etc/kolab/templates."
+ ewarn "You MUST ensure that the path to your Horde installation is correctly"
+ ewarn "set as TARGET in the template files!"
+ ewarn "After installing/updating this package you MUST run kolabconf!"
+ fi
+ fi
+ webapp_pkg_postinst
+}
diff --git a/eclass/horde-kolab.eclass b/eclass/horde-kolab.eclass
new file mode 100644
index 0000000..e5acf31
--- /dev/null
+++ b/eclass/horde-kolab.eclass
@@ -0,0 +1,112 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/horde.eclass,v 1.33 2006/03/09 23:35:52 vapier Exp $
+#
+# Help manage the horde project http://www.horde.org/
+#
+# Author: Mike Frysinger <vapier@gentoo.org>
+# CVS additions by Chris Aniszczyk <zx@mea-culpa.net>
+# SNAP additions by Jonathan Polansky <jpolansky@lsit.ucsb.edu>
+#
+# This eclass provides generic functions to make the writing of horde
+# ebuilds fairly trivial since there are many horde applications and
+# they all share the same basic install process.
+
+# EHORDE_SNAP
+# This variable tracks whether the user is using a snapshot version
+#
+# EHORDE_SNAP_BRANCH
+# You set this via the ebuild to whatever branch you wish to grab a
+# snapshot of. Typically this is 'HEAD' or 'RELENG'.
+#
+# EHORDE_CVS
+# This variable tracks whether the user is using a cvs version
+
+inherit eutils
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
+
+[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/-kolab}" && HORDE_PN="${HORDE_PN/horde-}"
+[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
+
+SRC_URI="http://ftp.horde.org/pub/${HORDE_PN}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}.tar.gz"
+S=${WORKDIR}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}
+HOMEPAGE="http://www.horde.org/${HORDE_PN}"
+
+LICENSE="LGPL-2"
+
+# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
+INSTALL_DIR="/horde"
+[[ ${HORDE_PN} != "horde" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
+
+horde-kolab_pkg_setup() {
+
+ if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
+ local param
+ if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
+ param="-o"
+ HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
+ fi
+ if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
+ echo
+ if [[ ${param} == "-o" ]] ; then
+ eerror "You MUST re-emerge php with at least one of"
+ else
+ eerror "You MUST re-emerge php with all of"
+ fi
+ eerror "the following options in your USE:"
+ eerror " ${HORDE_PHP_FEATURES}"
+ die "current php install cannot support ${HORDE_PN}"
+ fi
+ fi
+}
+
+horde-kolab_src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ [[ -f test.php ]] && chmod 000 test.php
+ [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
+
+ cd config
+ for f in *.dist; do cp $f `basename $f .dist`; done
+ cd ..
+}
+
+horde-kolab_src_install() {
+
+ local destdir=/var/www/kolab/htdocs/horde
+ [[ ${HORDE_PN} != "horde" ]] && destdir=/var/www/kolab/htdocs/horde/${HORDE_PN}
+ [[ -n ${HORDE_BASEDIR} ]] && destdir=/var/www/kolab/htdocs/horde${HORDE_BASEDIR}
+
+ # Install docs and then delete them (except for CREDITS which
+ # many horde apps include in their help page #121003)
+ dodoc README docs/*
+ mv docs/CREDITS "${T}"/
+ rm -rf COPYING LICENSE README docs/*
+ mv "${T}"/CREDITS docs/
+
+ dodir ${destdir}
+ cp -r . ${D}/${destdir}/ || die "install files"
+
+ chown -R apache\: ${D}/${destdir}/config
+
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ insinto /etc/kolab/templates
+ doins ${HORDE_KOLAB_TEMPLATES}
+ fi
+}
+
+horde-kolab_pkg_postinst() {
+ if [[ -e ${ROOT}/usr/share/doc/${PF}/INSTALL.gz ]] ; then
+ einfo "Please read /usr/share/doc/${PF}/INSTALL.gz"
+ fi
+ einfo "Before this package will work, you have to setup"
+ einfo "the configuration files. Please review the"
+ einfo "config/ subdirectory of ${HORDE_PN} in the webroot."
+ if [[ ${HORDE_PN} != "horde" ]] ; then
+ ewarn
+ ewarn "Make sure ${HORDE_PN} is accounted for in horde's root"
+ ewarn " config/registry.php"
+ fi
+}
diff --git a/eclass/php-pear-manylibs-r1.eclass b/eclass/php-pear-manylibs-r1.eclass
new file mode 100644
index 0000000..6b0c49c
--- /dev/null
+++ b/eclass/php-pear-manylibs-r1.eclass
@@ -0,0 +1,82 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-lib-r1.eclass,v 1.9 2006/03/10 10:47:49 sebastian Exp $
+#
+# Author: Luca Longinotti <chtekk@gentoo.org>
+# Maintained by the PHP Herd <php-bugs@gentoo.org>
+#
+# Based on Tal Peer's <coredumb@gentoo.org> work on php-pear.eclass.
+#
+# The php-pear-lib-r1 eclass provides means for an easy installation of PEAR
+# based libraries, such as Creole, Jargon, Phing etc., while retaining
+# the functionality to put the libraries into version-dependant dirs.
+
+inherit depend.php
+
+EXPORT_FUNCTIONS src_install
+
+# We must depend on the base package as we need it to let
+# PEAR work, as well as PEAR itself.
+DEPEND="${DEPEND} dev-lang/php >=dev-php/PEAR-PEAR-1.3.6"
+RDEPEND="${RDEPEND} ${DEPEND}"
+
+# List the packages to install in this variable in your ebuild
+PEAR_PACKAGES=""
+
+php-pear-manylibs-r1_src_install() {
+ has_php
+
+ # SNMP support
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/
+
+ case "${CATEGORY}" in
+ dev-php)
+ if has_version '=dev-lang/php-5*' ; then
+ PHP_BIN="/usr/lib/php5/bin/php"
+ else
+ PHP_BIN="/usr/lib/php4/bin/php"
+ fi ;;
+ dev-php4) PHP_BIN="/usr/lib/php4/bin/php" ;;
+ dev-php5) PHP_BIN="/usr/lib/php5/bin/php" ;;
+ *) die "I don't know which version of PHP packages in ${CATEGORY} require"
+ esac
+
+ cd "${S}"
+
+ for PKG in ${PEAR_PACKAGES}
+ do
+
+ if has_version '=dev-php/PEAR-PEAR-1.3*' ; then
+ pear -d php_bin="${PHP_BIN}" install --nodeps --installroot="${D}" "${S}/${PKG}/package.xml" > /dev/null || die "Unable to install PEAR package ${PKG}"
+ else
+ if has_version '>=dev-php/PEAR-PEAR-1.4.8' ; then
+ pear -d php_bin="${PHP_BIN}" install --force --loose --nodeps --offline --packagingroot="${D}" "${S}/${PKG}/package.xml" > /dev/null || die "Unable to install PEAR package ${PKG}"
+ else
+ pear -d php_bin="${PHP_BIN}" install --nodeps --packagingroot="${D}" "${S}/${PKG}/package.xml" > /dev/null || die "Unable to install PEAR package ${PKG}"
+ fi
+ fi
+
+ rm -rf "${D}/usr/share/php/.channels" \
+ "${D}/usr/share/php/.depdblock" \
+ "${D}/usr/share/php/.depdb" \
+ "${D}/usr/share/php/.filemap" \
+ "${D}/usr/share/php/.lock" \
+ "${D}/usr/share/php/.registry"
+ done
+
+ # install to the correct phpX folder, if not specified
+ # /usr/share/php will be kept, also sedding to substitute
+ # the path, many files can specify it wrongly
+ if [ -n "${PHP_SHARED_CAT}" ] && [ "${PHP_SHARED_CAT}" != "php" ] ; then
+ mv -f "${D}/usr/share/php" "${D}/usr/share/${PHP_SHARED_CAT}" || die "Unable to move files"
+ find "${D}/" -type f -exec sed -e "s|/usr/share/php|/usr/share/${PHP_SHARED_CAT}|g" -i {} \; || die "Unable to change PHP path"
+ einfo
+ einfo "Installing to /usr/share/${PHP_SHARED_CAT} ..."
+ einfo
+ else
+ einfo
+ einfo "Installing to /usr/share/php ..."
+ einfo
+ fi
+}