2015-06-30 11:57:33 +02:00
|
|
|
# $NetBSD: Makefile,v 1.14 2015/06/30 09:57:41 ryoon Exp $
|
2009-11-19 16:48:19 +01:00
|
|
|
|
2015-05-23 15:43:15 +02:00
|
|
|
DISTNAME= vnstat-1.14
|
2015-06-30 11:57:33 +02:00
|
|
|
PKGREVISION= 1
|
2009-11-19 16:48:19 +01:00
|
|
|
CATEGORIES= net
|
|
|
|
MASTER_SITES= http://humdi.net/vnstat/
|
|
|
|
#DISTFILES=${DISTNAME}.tar.gz
|
|
|
|
|
|
|
|
MAINTAINER= sborrill@NetBSD.org
|
|
|
|
HOMEPAGE= http://humdi.net/vnstat/
|
|
|
|
COMMENT= Small network traffic monitor
|
|
|
|
LICENSE= gnu-gpl-v2
|
|
|
|
|
|
|
|
USE_TOOLS+= gmake
|
|
|
|
|
|
|
|
VNSTAT_CONFIG= ${PKG_SYSCONFDIR}/vnstat.conf
|
|
|
|
VNSTAT_EGDIR= ${PREFIX}/share/examples
|
|
|
|
|
|
|
|
SUBST_CLASSES+= fix-dbpath
|
|
|
|
SUBST_STAGE.fix-dbpath= pre-configure
|
|
|
|
SUBST_MESSAGE.fix-dbpath= Fixing path to database files
|
|
|
|
SUBST_FILES.fix-dbpath= src/common.h cfg/vnstat.conf
|
|
|
|
SUBST_FILES.fix-dbpath+= man/vnstat.1 man/vnstatd.1
|
|
|
|
SUBST_FILES.fix-dbpath+= man/vnstati.1
|
|
|
|
SUBST_SED.fix-dbpath= -e 's,/var/lib/,${VARBASE}/db/,g'
|
|
|
|
|
|
|
|
SUBST_CLASSES+= fix-etcpath
|
|
|
|
SUBST_STAGE.fix-etcpath= pre-configure
|
|
|
|
SUBST_MESSAGE.fix-etcpath= Fixing path to configuration files
|
|
|
|
SUBST_FILES.fix-etcpath= src/cfg.c
|
|
|
|
SUBST_FILES.fix-etcpath+= man/vnstat.1 man/vnstatd.1
|
|
|
|
SUBST_FILES.fix-etcpath+= man/vnstati.1
|
|
|
|
SUBST_SED.fix-etcpath= -e 's,/etc/,${PKG_SYSCONFDIR}/,g'
|
|
|
|
|
|
|
|
CONF_FILES= ${VNSTAT_EGDIR}/vnstat.conf ${VNSTAT_CONFIG}
|
|
|
|
|
|
|
|
RCD_SCRIPTS= vnstatd
|
|
|
|
|
|
|
|
BUILD_DEFS+= VARBASE
|
|
|
|
|
2009-11-26 15:11:44 +01:00
|
|
|
INSTALLATION_DIRS= bin ${VNSTAT_EGDIR} ${PKGMANDIR}/man1 \
|
|
|
|
${PKGMANDIR}/man5
|
|
|
|
|
2009-11-19 16:48:19 +01:00
|
|
|
.include "options.mk"
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/vnstat \
|
|
|
|
${DESTDIR}${PREFIX}/bin/vnstat
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/vnstatd \
|
|
|
|
${DESTDIR}${PREFIX}/bin/vnstatd
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/cfg/vnstat.conf \
|
|
|
|
${DESTDIR}${VNSTAT_EGDIR}/vnstat.conf
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/vnstat.1 \
|
2009-11-26 15:11:44 +01:00
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/vnstat.1
|
2009-11-19 16:48:19 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/vnstatd.1 \
|
2009-11-26 15:11:44 +01:00
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/vnstatd.1
|
2009-11-19 16:48:19 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/vnstat.conf.5 \
|
2009-11-26 15:11:44 +01:00
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/vnstat.conf.5
|
2012-04-17 23:35:56 +02:00
|
|
|
if [ ${PLIST.gd:Q} = "yes" ]; then \
|
2009-11-19 16:48:19 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/vnstati \
|
|
|
|
${DESTDIR}${PREFIX}/bin/vnstati; \
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/vnstati.1 \
|
2009-11-26 15:11:44 +01:00
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/vnstati.1; \
|
2012-04-17 23:35:56 +02:00
|
|
|
fi
|
2009-11-19 16:48:19 +01:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|