[package] fix vnstat install usage on FreeBSD and MacOSX (#7718)
[openwrt/svn-archive/archive.git] / net / vnstat / patches / 004-install_bsd_fix.patch
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.
2
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.
4
5 The patch is meant to go in feeds/packages/net/vnstat/patches/ directory.
6
7 TRAC Ticket: https://dev.openwrt.org/attachment/ticket/7718/
8
9 Signed-off-by: Joe Roback <joe@roback.cc>
10
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
15 @@ -43,7 +43,8 @@
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; \
22 fi
23
24 # install everything else
25 @@ -63,7 +64,7 @@
26 then echo install -m 644 man/vnstati.1 $(MAN)/man1; \
27 install -m 644 man/vnstati.1 $(MAN)/man1; \
28 fi
29 -
30 +
31 @if [ -f $(MAN)/man1/vnstat.1.gz ]; \
32 then gzip -f9 $(MAN)/man1/vnstat.1; \
33 gzip -f9 $(MAN)/man1/vnstatd.1; \