1 vnstat's makefile uses the '-D' option which is only part of GNU install, thus compiling vnstat for OpenWrt on FreeBSD or Mac OS X fails because of the missing option.
3 Attached is a patch to have the install target separately create the destination directory before installing the vnstat.conf file to $(DEST)/etc. Additionally it also removes an erroneous tab character in the Makefile.
5 The patch is meant to go in feeds/packages/net/vnstat/patches/ directory.
7 TRAC Ticket: https://dev.openwrt.org/attachment/ticket/7718/
9 Signed-off-by: Joe Roback <joe@roback.cc>
11 Index: vnstat-1.10/Makefile
12 ===================================================================
13 --- a/Makefile 2010-08-06 23:32:29.000000000 -0600
14 +++ b/Makefile 2010-08-06 23:35:27.000000000 -0600
16 # install default config if such doesn't exist
17 @if [ ! -f "$(DESTDIR)/etc/vnstat.conf" ]; \
18 then echo "Installing config to $(DESTDIR)/etc/vnstat.conf"; \
19 - install -D -m 644 cfg/vnstat.conf $(DESTDIR)/etc/vnstat.conf; \
20 + install -d -m 755 $(DESTDIR)/etc; \
21 + install -m 644 cfg/vnstat.conf $(DESTDIR)/etc/vnstat.conf; \
24 # install everything else
26 then echo install -m 644 man/vnstati.1 $(MAN)/man1; \
27 install -m 644 man/vnstati.1 $(MAN)/man1; \
31 @if [ -f $(MAN)/man1/vnstat.1.gz ]; \
32 then gzip -f9 $(MAN)/man1/vnstat.1; \
33 gzip -f9 $(MAN)/man1/vnstatd.1; \