pkgsrc/net/vnstat/Makefile

67 lines
2 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.14 2015/06/30 09:57:41 ryoon Exp $
1.14 / 26-Apr-2015 - Fix: JSON output syntax during first day of newly created databases (pull request by Stefan Merettig) - Fix: field padding when using UTF-8 locale - Add optional mode parameter to --json and --xml for limiting the output to only selected information 1.13 / 18-Jan-2015 - Fix: getgroup() test in Debian GNU/kFreeBSD (patch by Felix Geyer) - Fix: struct if_data usage after freeifaddrs() call in BSD - Dynamic unit selection in hourly output instead of being fixed to KiB - New options in image output (vnstati) * -nl / --nolegend for hiding the rx/tx legend * --altdate for using alternative date and time text location * --headertext for using custom text string in image header section - Add legend to hourly output image - Add option for content alignment and page background color to vnstat.cgi - Document keyword value ranges in configuration file man page - Import Makefile improvements from OpenBSD (pull requests by Jasper Lievisse Adriaanse) - Automatic interface bandwidth detection, BandwidthDetection in config, default fallback value MaxBandwidth changed from 100 to 1000 - JSON output (--json), vnstat-json.cgi and vnstat-json.php examples provided in the 'examples' directory - Drop support for over 10 year old database formats (versions 1.0 - 1.2) 1.12 / 30-Aug-2014 - Fix: Memory allocation when zero interfaces are available, also lo needed to be missing in order to trigger this leak - Fix: Rebuild total indexing (thanks to William Epp for reporting this) - Fix: Some error situations could leave database file open until the end of command execution - Fix: Live traffic meter occasionally showing higher minimum than average in end statistics (Debian Bug #687812) - Fix: Setting locale when none is specified in config (Debian Bug #606397) - Fix: Cppcheck findings (may fix Debian Bug #692330) - Improve traffic meter output accuracy - Add tests and debug compilation target - Remove use of -D parameter in Makefile install commands in order to improve cross-compilation support - Set CFLAGS in Makefiles only when not already defined - Add support for database import from text file (--importdb) (based on patch by Tilmann Bubeck) - Rename --dumpdb to --exportdb - Add example systemd service file - Add example launchd plist file for OS X - Use ISO YYYY-MM-DD date format timestamps if logfile is used - Improve daemon startup prints - Add parameters for changing daemon process user and group - Add example upstart job configuration file (thanks to Cameron Norman) - Create database, pid and log dirs during daemon startup if necessary - Update ownership of database, log and pid files if needed during daemon startup if started as root and configured to change process user and group - Remove cron update related example files and documentation, the cron update method should be considered as deprecated - --create parameter for database creation
2015-05-23 15:43:15 +02:00
DISTNAME= vnstat-1.14
PKGREVISION= 1
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
INSTALLATION_DIRS= bin ${VNSTAT_EGDIR} ${PKGMANDIR}/man1 \
${PKGMANDIR}/man5
.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 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/vnstat.1
${INSTALL_MAN} ${WRKSRC}/man/vnstatd.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/vnstatd.1
${INSTALL_MAN} ${WRKSRC}/man/vnstat.conf.5 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/vnstat.conf.5
if [ ${PLIST.gd:Q} = "yes" ]; then \
${INSTALL_PROGRAM} ${WRKSRC}/src/vnstati \
${DESTDIR}${PREFIX}/bin/vnstati; \
${INSTALL_MAN} ${WRKSRC}/man/vnstati.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/vnstati.1; \
fi
.include "../../mk/bsd.pkg.mk"