summaryrefslogtreecommitdiff
blob: 3d9180adfade9493ed01036852738a8b58e53627 (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

WEBAPP_MANUAL_SLOT="yes"
inherit versionator webapp depend.php

DATESTAMP="-$(get_version_component_range 4)"
MY_PV=$(get_version_component_range 1-2)-$(get_version_component_range 3)
MY_P="LBcore-${MY_PV}-Linux_x86_64${DATESTAMP}.tar.gz"

DESCRIPTION="lanbilling - billing system for internet/telephony service providers"
HOMEPAGE="http://www.lanbilling.ru/"
SRC_URI="${MY_P}"
RESTRICT="fetch"
echo $MY_P

RESTRICT="fetch binchecks"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"

S=${WORKDIR}

pkg_nofetch() {
	elog "Please download ${A} from ${HOMEPAGE}"
	elog "and move it to ${DISTDIR}"
}

src_install() {
	dodir etc
	mv etc/billing.conf.LBcore.sample "${ED}"/etc/billing.conf || die
	rm -rf etc

	pushd usr/local/billing/phpclient >/dev/null
	webapp_src_preinst
	mkdir admin/files
	SERVEROWNED_LIST="$(find admin/files admin/templates -type d) admin/users_reports"
	mv * "${ED}"${MY_HTDOCSDIR} || die
	webapp_serverowned $(printf "${MY_HTDOCSDIR}/%s " ${SERVEROWNED_LIST})
#	webapp_configfile ${MY_HTDOCSDIR}/soap/api3.wsdl
	webapp_src_install
	popd >/dev/null

	mv ./usr/* "${ED}"/usr || die

	newinitd "${FILESDIR}/LBcore.initd" LBcore || die
	newconfd "${FILESDIR}/LBcore.confd" LBcore || die

}