summaryrefslogtreecommitdiff
blob: 037e16bdcce6c0e5a9bc595c634576d144028162 (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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=0

inherit webapp

DESCRIPTION="PHP stats app that reads Apache logs and imports the data into a MySQL database"
HOMEPAGE="http://openwebstats.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
KEYWORDS="~x86"
IUSE=""

DEPEND="dev-lang/php"

S=${WORKDIR}/${PN}

src_install() {
	webapp_src_preinst

	dodoc README

	## Main application
	cp -r . "${D}${MY_HTDOCSDIR}"
	cp "${FILESDIR}/config.php" "${D}${MY_HTDOCSDIR}/"

	## Docs installed, remove unnecessary files
	rm -f "${D}${MY_HTDOCSDIR}/README"
	rm -f "${D}${MY_HTDOCSDIR}/CHANGELOG"

	# Database creation
	webapp_sqlscript mysql "${D}${MY_HTDOCSDIR}/openwebstats.sql"

	# Postinstall instructions
	webapp_postinst_txt en "${FILESDIR}/postinstall-en.txt"

	webapp_src_install
}