summaryrefslogtreecommitdiff
blob: ba83600581c5a2e406773c7b3baed8bba9e21aa6 (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
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/dev-php/phpdbg/phpdbg-2.10-r1.ebuild,v 1.2 2002/07/11 06:30:24 drobbins 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"

DEPEND=">=dev-php/mod_php-4.2.1"

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

}