[packages] vnstat: fix compilation on non-linux hosts (#6656)
authorStephen Walker <stephendwalker@gmail.com>
Thu, 18 Feb 2010 06:23:02 +0000 (06:23 +0000)
committerStephen Walker <stephendwalker@gmail.com>
Thu, 18 Feb 2010 06:23:02 +0000 (06:23 +0000)
SVN-Revision: 19703

net/vnstat/patches/002-no_install_strip.patch
net/vnstat/patches/003-no_install_uname.patch [new file with mode: 0644]

index 0335915..2553bb8 100644 (file)
@@ -1,7 +1,6 @@
-diff -urN vnstat-1.10/Makefile vnstat-1.10.new/Makefile
---- vnstat-1.10/Makefile       2009-08-01 21:23:43.000000000 +0200
-+++ vnstat-1.10.new/Makefile   2010-01-03 21:51:31.000000000 +0100
-@@ -54,11 +54,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -54,11 +54,11 @@ install:
  
  # install everything else
        install -d -m 755 $(BIN) $(SBIN) $(MAN)/man1 $(MAN)/man5 $(DESTDIR)/var/lib/vnstat
@@ -17,7 +16,7 @@ diff -urN vnstat-1.10/Makefile vnstat-1.10.new/Makefile
        fi
  
  # update man pages, gzip it if previous version was done so   
-@@ -127,12 +127,12 @@
+@@ -127,12 +127,12 @@ bsdinstall:
  
  # install binaries
        install -dm 755 $(DESTDIR)/var/db/vnstat
diff --git a/net/vnstat/patches/003-no_install_uname.patch b/net/vnstat/patches/003-no_install_uname.patch
new file mode 100644 (file)
index 0000000..2c7859b
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/Makefile
++++ b/Makefile
+@@ -22,12 +22,6 @@ clean:
+ install:
+       @echo "Installing vnStat..."
+-# check that system is really Linux
+-      @if [ `uname` != "Linux" ]; \
+-      then echo "This isn't a Linux system. Maybe 'make bsdinstall' is what you need?"; \
+-      false; \
+-      fi
+-
+ # check that there's something to install
+       @if [ ! -f "src/vnstat" ] || [ ! -f "src/vnstatd" ]; \
+       then echo "Nothing to install, run make first."; \