diff options
author | Karl Trygve Kalleberg <karltk@gentoo.org> | 2002-10-31 18:29:07 +0000 |
---|---|---|
committer | Karl Trygve Kalleberg <karltk@gentoo.org> | 2002-10-31 18:29:07 +0000 |
commit | 9cedee74f3cf40700bda498d34ff82ee88028113 (patch) | |
tree | 19b73bea9e2268d7f8efe6ac0a51b4f7d0cff1ea /net-www | |
parent | graphical process statistics (diff) | |
download | gentoo-2-9cedee74f3cf40700bda498d34ff82ee88028113.tar.gz gentoo-2-9cedee74f3cf40700bda498d34ff82ee88028113.tar.bz2 gentoo-2-9cedee74f3cf40700bda498d34ff82ee88028113.zip |
Fixes #6046.
Diffstat (limited to 'net-www')
-rw-r--r-- | net-www/horde-imp/ChangeLog | 8 | ||||
-rw-r--r-- | net-www/horde-imp/files/digest-horde-imp-3.1 | 1 | ||||
-rw-r--r-- | net-www/horde-imp/horde-imp-3.1.ebuild | 91 |
3 files changed, 100 insertions, 0 deletions
diff --git a/net-www/horde-imp/ChangeLog b/net-www/horde-imp/ChangeLog new file mode 100644 index 000000000000..168f5fde7d68 --- /dev/null +++ b/net-www/horde-imp/ChangeLog @@ -0,0 +1,8 @@ +# ChangeLog for net-mail/horde-imp +# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/horde-imp/ChangeLog,v 1.1 2002/10/31 18:29:07 karltk Exp $ + +*horde-imp-3.1 (31 Oct 2002) + + 31 Oct 2002; Karl Trygve Kalleberg <karltk@gentoo.org> horde-imp-2.1.ebuild files/digest-horde-imp-3.1 : + Initial import. Ebuild submitted by Christophe GUILLOUX <cg@rootix.info>. diff --git a/net-www/horde-imp/files/digest-horde-imp-3.1 b/net-www/horde-imp/files/digest-horde-imp-3.1 new file mode 100644 index 000000000000..19a9112c3ac9 --- /dev/null +++ b/net-www/horde-imp/files/digest-horde-imp-3.1 @@ -0,0 +1 @@ +MD5 73ff42a32e3ee3617fd411be356cb70f imp-3.1.tar.gz 1027446 diff --git a/net-www/horde-imp/horde-imp-3.1.ebuild b/net-www/horde-imp/horde-imp-3.1.ebuild new file mode 100644 index 000000000000..29eeeb1ccc77 --- /dev/null +++ b/net-www/horde-imp/horde-imp-3.1.ebuild @@ -0,0 +1,91 @@ +# Copyright 2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/horde-imp/horde-imp-3.1.ebuild,v 1.1 2002/10/31 18:29:07 karltk Exp $ + +DESCRIPTION="IMP provides webmail access" +HOMEPAGE="http://www.horde.org" +P=imp-3.1 +SRC_URI="ftp://ftp.horde.org/pub/imp/tarballs/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="1" +KEYWORDS="~x86 ~ppc ~sparc ~sparc64 ~alpha" +DEPEND="" +RDEPEND=">=net-www/horde-2.1" + +find_http_root() { + export HTTPD_ROOT=`grep apache /etc/passwd | cut -d: -f6`/htdocs + + if [ -z "${HTTPD_ROOT}" ]; then + eerror "HTTPD_ROOT is null! Using defaults." + eerror "You probably want to check /etc/passwd" + HTTPD_ROOT="/home/httpd/htdocs" + fi + + export REGISTRY=${HTTPD_ROOT}/horde/config/registry.php + [ -f ${REGISTRY} ] || REGISTRY=${HTTPD_ROOT}/horde/config/registry.php.dist +} + +pkg_setup() { + # FIXME: Is this really how we want to do this ? + GREP=`grep imap /var/db/pkg/dev-php/mod_php*/USE` + if [ "${GREP}" != "" ]; then + return 0 + else + eerror "Missing IMAP support in mod_php !" + die "aborting..." + fi + find_http_root + [ -f ${REGISTRY} ] || die "${REGISTRY} not found" +} + +src_compile() { + echo "Nothing to compile" +} + +src_install () { + + # detecting apache usergroup + # FIXME: With time, apache's GID should be static + GID=`grep apache /etc/group |cut -d: -f3` + if [ -z "${GID}" ]; then + einfo "Using default GID of 81 for Apache" + GID=81 + fi + + find_http_root + + dodir ${HTTPD_ROOT}/horde/imp + cp -r . ${D}/${HTTPD_ROOT}/horde/imp + + # protecting files + chown -R root.${GID} ${D}/${HTTPD_ROOT}/horde/imp + find ${D}/${HTTPD_ROOT}/horde/imp/ -type f -exec chmod 0640 {} \; + find ${D}/${HTTPD_ROOT}/horde/imp/ -type d -exec chmod 0750 {} \; +} + +pkg_postinst() { + + find_http_root + + # add module in horde + sed -e "/^\/\/.*\(\$this->applications\['imp'\].*\)/ \ + { : next ; N ; /\;/ { s/\/\///g ; b } ; b next }" \ + < ${REGISTRY} > ${REGISTRY}.temp + cp ${REGISTRY}.temp ${REGISTRY} + rm ${REGISTRY}.temp + + # end + einfo "Please read ${HTTPD_ROOT}/horde/imp/docs/INSTALL !" +} + +pkg_prerm() { + find_http_root + + # rm module from horde + sed -e "/\(\$this->applications\['imp'\].*\)/ \ + { s/\(.*\)/\/\/\1/g; : suite ; N ; /\;/ { s/\n/\n\/\//g ; b } ; \ + b suite }" \ + < ${REGISTRY} > ${REGISTRY}.temp + cp ${REGISTRY}.temp ${REGISTRY} + rm ${REGISTRY}.temp +} |