[package] fix vnstat install usage on FreeBSD and MacOSX (#7718)
authorFlorian Fainelli <florian@openwrt.org>
Sat, 4 Sep 2010 18:04:13 +0000 (18:04 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 4 Sep 2010 18:04:13 +0000 (18:04 +0000)
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.

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.

The patch is meant to go in feeds/packages/net/vnstat/patches/ directory.

TRAC Ticket: https://dev.openwrt.org/attachment/ticket/7718/

Signed-off-by: Joe Roback <joe@roback.cc>
SVN-Revision: 22913

net/vnstat/patches/004-install_bsd_fix.patch [new file with mode: 0644]

diff --git a/net/vnstat/patches/004-install_bsd_fix.patch b/net/vnstat/patches/004-install_bsd_fix.patch
new file mode 100644 (file)
index 0000000..0b8aa22
--- /dev/null
@@ -0,0 +1,33 @@
+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.
+
+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.
+
+The patch is meant to go in feeds/packages/net/vnstat/patches/ directory.
+
+TRAC Ticket: https://dev.openwrt.org/attachment/ticket/7718/
+
+Signed-off-by: Joe Roback <joe@roback.cc>
+
+Index: vnstat-1.10/Makefile
+===================================================================
+--- a/Makefile 2010-08-06 23:32:29.000000000 -0600
++++ b/Makefile 2010-08-06 23:35:27.000000000 -0600
+@@ -43,7 +43,8 @@
+ # install default config if such doesn't exist
+       @if [ ! -f "$(DESTDIR)/etc/vnstat.conf" ]; \
+       then echo "Installing config to $(DESTDIR)/etc/vnstat.conf"; \
+-      install -D -m 644 cfg/vnstat.conf $(DESTDIR)/etc/vnstat.conf; \
++      install -d -m 755 $(DESTDIR)/etc; \
++      install -m 644 cfg/vnstat.conf $(DESTDIR)/etc/vnstat.conf; \
+       fi
+ # install everything else
+@@ -63,7 +64,7 @@
+       then echo install -m 644 man/vnstati.1 $(MAN)/man1; \
+       install -m 644 man/vnstati.1 $(MAN)/man1; \
+       fi
+-      
++
+       @if [ -f $(MAN)/man1/vnstat.1.gz ]; \
+       then gzip -f9 $(MAN)/man1/vnstat.1; \
+       gzip -f9 $(MAN)/man1/vnstatd.1; \