aboutsummaryrefslogtreecommitdiff
path: root/net/abills/Makefile
blob: 21cc366ad936369899601a13f64efd8585af0f1f (plain) (blame)
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
58
59
# New ports collection makefile for:	abills
# Date created:		2 February 2005
# Whom:			Michael Lednev <liettneff@bk.ru>
#
# $FreeBSD$
#

PORTNAME=	abills
PORTVERSION=	0.24b
CATEGORIES=	net
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}
EXTRACT_SUFX=	.tgz
DIST_SUBDIR=	${PORTNAME}

PATCH_SITES=	http://vibrators.ru/abills/
PATCHFILES=	patches-aa.tar.bz2

MAINTAINER=	liettneff@bk.ru
COMMENT=	Billing system for dialup and VPN users

RUN_DEPENDS=	radiusd:${PORTSDIR}/net/freeradius \
		${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql \
		${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
		${SITE_PERL}/${PERL_ARCH}/Digest/MD4.pm:${PORTSDIR}/security/p5-Digest-MD4 \
		${SITE_PERL}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-Digest-SHA1 \
		${SITE_PERL}/${PERL_ARCH}/Crypt/DES.pm:${PORTSDIR}/security/p5-Crypt-DES

USE_REINPLACE=	yes
USE_PERL5_RUN=	yes
NO_BUILD=	yes
WRKSRC=		${WRKDIR}/${PORTNAME}
SUB_FILES=	pkg-message
PKGMESSAGE=	${WRKDIR}/pkg-message

.if defined(WITH_GRAPHICS)
RUN_DEPENDS+=	${SITE_PERL}/RRDp.pm:${PORTSDIR}/net/rrdtool
.endif

pre-everything::
	@ ${ECHO} ""
	@ ${ECHO} "	Define WITH_GRAPHICS if you want traffic graphs (experimental)"
	@ ${ECHO} ""

post-extract:
	@ ${MKDIR} ${WRKSRC}/var/log/q ${WRKSRC}/var/log/devices ${WRKSRC}/cgi-bin/admin/nets ${WRKSRC}/cgi-bin/admin/graphics ${WRKSRC}/backup

post-patch:
	@ ${FIND} ${WRKSRC} -type f -name '*.orig' -exec ${RM} {} \;
	@ ${FIND} ${WRKSRC} -type f -exec ${REINPLACE_CMD} -i '' -e 's,/usr/abills,${PREFIX}/abills,g' {} \;

do-install:
	@ ${CP} -R ${WRKSRC} ${PREFIX}
	@ ${CHOWN} -R www ${PREFIX}/abills/cgi-bin

post-install:
	@ ${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>