summaryrefslogtreecommitdiff
blob: c9b53aee4c156685b8d8cf81b8d58bcb1563fd47 (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-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit webapp depend.php

PHPUSERTRACK_PHP_FEATURES="session mysqli"

MY_PN="phpUserTrack"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="A site statistic collection and analyzation program written in PHP."
SRC_URI="http://phpusertrack.com/downloads/${MY_P}.tar.gz"
HOMEPAGE="http://www.phpusertrack.com/"

LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"
IUSE="geoip minimal"

DEPEND=""
RDEPEND="virtual/httpd-cgi
	dev-php/PEAR-MDB2_Driver_mysqli
	geoip? ( dev-php/PEAR-Net_GeoIP )
	!minimal? ( dev-php/PEAR-Cache_Lite
		    dev-php/PEAR-MDB2_Driver_mysql )"
	# dev-php/PEAR-Structures_Graph

need_php_httpd

S="${WORKDIR}/${MY_P}"

pkg_setup() {
	local flags="session tidy" # mysqli already checked for by dev-php/PEAR-MDB2_Driver_mysqli
	if ! PHPCHECKNODIE="yes" require_php_with_use ${flags} || \
		! PHPCHECKNODIE="yes" require_php_with_any_use gd gd-external ; then
			die "Re-install ${PHP_PKG} with ${flags} and either gd or gd-external"
	fi
	webapp_pkg_setup
}

src_install () {
	webapp_src_preinst

	dodoc ChangeLog
	rm -f ChangeLog INSTALL

	mv conf/conf.php.dist conf/conf.php
	cp -r . "${D}/${MY_HTDOCSDIR}"

	webapp_serverowned "${MY_HTDOCSDIR}"/templates_c
	webapp_serverowned "${MY_HTDOCSDIR}"/cache
	webapp_configfile "${MY_HTDOCSDIR}"/conf/conf.php
	webapp_sqlscript mysql scripts/mysql/create_database.sql

	webapp_src_install
}