summaryrefslogtreecommitdiff
path: root/mail/mailgraph/Makefile
blob: 1ee6740aeecaa59ff6468d0c610291aa9fcad6d7 (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
58
59
60
# $NetBSD: Makefile,v 1.15 2008/03/17 11:43:06 obache Exp $
#

DISTNAME=	mailgraph-1.13
#PKGREVISION=	1
CATEGORIES=	mail
MASTER_SITES=	http://mailgraph.schweikert.ch/pub/	\
		http://mailgraph.schweikert.ch/pub/old

MAINTAINER=	kim@tac.nyc.ny.us
HOMEPAGE=	http://mailgraph.schweikert.ch/
COMMENT=	RRDtool frontend for mail statistics

DEPENDS+=	rrdtool>=1:../../databases/rrdtool
DEPENDS+=	p5-File-Tail-[0-9]*:../../misc/p5-File-Tail

PKG_DESTDIR_SUPPORT=	user-destdir

USE_TOOLS+=	perl:run

.include "../../mk/bsd.prefs.mk"

DBDIR?=		${VARBASE}/db/${PKGBASE}

MG_SCRIPTS=	mailgraph.cgi mailgraph.pl

REPLACE_PERL+=	${MG_SCRIPTS}

RCD_SCRIPTS=	mailgraph

SUBST_CLASSES+=		defs
SUBST_STAGE.defs=	pre-build
SUBST_FILES.defs=	${MG_SCRIPTS}
# Database
SUBST_SED.defs+=	-e 's,/var/log\([^/]\),${DBDIR}\1,g'
SUBST_SED.defs+=	-e 's,/var/log$$,${DBDIR},g'
# Logfile
SUBST_SED.defs+=	-e 's,/var/log/syslog,${VARBASE}/log/maillog,g'
#
SUBST_MESSAGE.defs=	Fixing defaults.

INSTALLATION_DIRS=	sbin

do-build:

do-configure:

do-install:
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/libexec/cgi-bin
	${INSTALL_SCRIPT} ${WRKSRC}/mailgraph.cgi \
		${DESTDIR}${PREFIX}/libexec/cgi-bin/mailgraph.cgi
	${INSTALL_SCRIPT} ${WRKSRC}/mailgraph.pl \
		${DESTDIR}${PREFIX}/sbin/mailgraph
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/mailgraph
.for i in CHANGES COPYING README
	${INSTALL_DATA} ${WRKSRC}/${i} \
		${DESTDIR}${PREFIX}/share/doc/mailgraph/${i}
.endfor

.include "../../mk/bsd.pkg.mk"