# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit webapp eutils


MY_P="glpi-0.6"
S=${WORKDIR}/"glpi"

DESCRIPTION="GLPI est une application libre, distribuée sous licence GPL destinée à la gestion de parc informatique."
HOMEPAGE="http://glpi.indepnet.org/"
SRC_URI="http://glpi.indepnet.org/IMG/gz/${MY_P}.tar.gz"
LICENSE="GPL"
KEYWORDS="~x86 ~amd64"
IUSE=""

# defined in webapp
#SLOT="${PVR}"

DEPEND="${DEPEND}
 		app-admin/webapp-config" 
RDEPEND="${DEPEND} 
		 virtual/php
		 dev-db/mysql"

src_unpack() {
	cd ${WORKDIR}
	unpack ${MY_P}.tar.gz
}

src_compile() {
	echo "Nothing to compile"
}

src_install() {
	
	webapp_src_preinst

	einfo "Copying main files"
	cd ${S}
	cp -r . ${D}/${MY_HTDOCSDIR} || die

	#All files must be owned by server
	for i in $(find . -print) ; do
		webapp_serverowned ${MY_HTDOCSDIR}/$i || die
	done

	webapp_src_install

}