summaryrefslogtreecommitdiff
blob: 9b9e317ab0bf94d5f11c4e53c77cf5305f11f1de (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
54
55
56
57
58
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-php/phpdbg/phpdbg-2.10-r1.ebuild,v 1.8 2003/09/08 04:45:56 msterret Exp $

PL="pl3"
S="${WORKDIR}/dbg-${PV}${PL}"
DESCRIPTION="A PHP debugger useable with some editors like phpedit."
SRC_URI="http://dd.cron.ru/dbg/dnld/dbg-${PV}${PL}.tar.gz"
HOMEPAGE="http://dd.cron.ru/dbg/"
LICENSE="dbgphp"
SLOT="0"
DEPEND="virtual/php"

# support for ppc or others?
KEYWORDS="x86 sparc "

src_unpack() {
	unpack "dbg-${PV}pl3.tar.gz"
	cd "${S}"
}

src_compile() {
	phpize
	./configure --enable-dbg=shared --with-dbg-profiler
	emake
}

src_install () {
	insinto /etc/php4/lib
	doins modules/dbg.so
	dodoc AUTHORS COPYING INSTALL
}

pkg_postinst() {
	echo "Performing post-installation routines for ${P}."

	if [ `cat /etc/php4/php.ini | grep extension=/etc/php4/lib/dbg.so` ]; then
	    einfo No changes made in php.ini
	else
			echo extension=/etc/php4/lib/dbg.so >> /etc/php4/php.ini
	fi

	einfo Please reload Apache to activate the changes

}

pkg_prerm() {
	echo "Performing pre-removal routines for ${P}."
	mv /etc/php4/php.ini /etc/php4/php.ini.old
	cat /etc/php4/php.ini.old | sed "s/extension=\/etc\/php4\/lib\/dbg.so//g" > /etc/php4/php.ini
	rm /etc/php4/php.ini.old
}

pkg_postrm() {
	einfo Please reload Apache to activate the changes

}