summaryrefslogtreecommitdiff
blob: 2ea68b60c378d0c80399fe3ed7fe6a7532763088 (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
48
49
50
51
52
53
# Copyright 1999-2001 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/net-mail/squirrelmail/squirrelmail-1.2.7.ebuild,v 1.5 2002/07/17 06:13:29 rphillips Exp $

S=${WORKDIR}/${P}
HTTPD_ROOT="/home/httpd/htdocs"
HTTPD_USER="apache"
HTTPD_GROUP="apache"

DESCRIPTION="Webmail for nuts!"
SRC_URI="http://unc.dl.sourceforge.net/sourceforge/squirrelmail/${P}.tar.bz2"
HOMEPAGE="http://www.squirrelmail.org"
LICENSE="GPL-2"
SLOT="1"
KEYWORDS="x86 ppc"

RDEPEND="virtual/php"
DEPEND="${RDEPEND}"


pkg_setup() {
	if [ -L ${HTTPD_ROOT}/squirrelmail ] ; then
		ewarn "You need to unmerge your old SquirrelMail version first."
		ewarn "SquirrelMail will be installed into ${HTTPD_ROOT}/squirrelmail"
		ewarn "directly instead of a version-dependant directory."
		die "need to unmerge old version first"
	fi
}

src_compile() {
	#nothing to compile
	echo "Nothing to compile"
}

src_install () {
	dodir ${HTTPD_ROOT}/squirrelmail
	cp -r . ${D}/${HTTPD_ROOT}/squirrelmail
	cd ${D}/${HTTPD_ROOT}
	chown -R ${HTTPD_USER}.${HTTPD_GROUP} squirrelmail
}

pkg_postinst() {
	einfo "Squirrelmail requires PHP to have 'register_globals = On'"
	einfo "Please edit /etc/php4/php.ini."
	einfo ""
	einfo "You will also want to move old SquirrelMail data to"
	einfo "the new location:"
	einfo ""
	einfo "\tmv ${HTTPD_ROOT}/squirrelmail-OLDVERSION/data/* \\"
	einfo "\t\t${HTTPD_ROOT}/squirrelmail/data"
	einfo "\tmv ${HTTPD_ROOT}/squirrelmail-OLDVERSION/config/config.php \\"
	einfo "\t\t${HTTPD_ROOT}/squirrelmail/config"
}