From 6fee06c52c25e39b0bf1cb98614d8bb235fc1321 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 3 Jan 2010 20:57:02 +0000 Subject: [PATCH] update vnstat to 1.10 (#6450) SVN-Revision: 19025 --- net/vnstat/Makefile | 22 ++++++------ net/vnstat/patches/002-no_install_strip.patch | 36 +++++++++++++++++++ 2 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 net/vnstat/patches/002-no_install_strip.patch diff --git a/net/vnstat/Makefile b/net/vnstat/Makefile index 5cdd0c12d..c155b42c9 100644 --- a/net/vnstat/Makefile +++ b/net/vnstat/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2009 OpenWrt.org +# Copyright (C) 2006-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vnstat -PKG_VERSION:=1.9 +PKG_VERSION:=1.10 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://humdi.net/vnstat -PKG_MD5SUM:=ebaf8352fa3674faea2fe2ce1001a38d +PKG_MD5SUM:=95421d968689130590348ceb80ff74a8 + +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:= libgd include $(INCLUDE_DIR)/package.mk @@ -75,11 +79,11 @@ endef define Package/vnstat/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/vnstat $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vnstat $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/vnstatd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vnstatd $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/cfg/vnstat.conf $(1)/etc/ + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vnstat.conf $(1)/etc/ $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) ./files/vnstat-uci.conf $(1)/etc/config/vnstat $(INSTALL_DIR) $(1)/etc/init.d @@ -88,24 +92,20 @@ endef define Package/vnstati/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/vnstati $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vnstati $(1)/usr/bin/ endef define Package/vnstat/postinst #!/bin/sh BIN_REL=/usr/bin/vnstat BIN=$${IPKG_INSTROOT}$${BIN_REL} -CRONTAB=$${IPKG_INSTROOT}/etc/crontabs/root LIB_D_REL=/var/lib/vnstat LIB_D=$${IPKG_INSTROOT}$${LIB_D_REL} -mkdir -p $${IPKG_INSTROOT}/etc/crontabs/ [ -d $$LIB_D ] || mkdir -p $$LIB_D IFACE_WAN=$$(uci get network.wan.ifname) if [ -n $$IFACE_WAN ]; then [ -e $$LIB_D/$$IFACE_WAN ] || ( [ -x $$BIN ] && $$BIN -u -i $$IFACE_WAN ) fi -grep -q "$$BIN_REL -u" $$CRONTAB 2>/dev/null -[ $$? -eq 0 ] && sed -i -e "/\/usr\/bin\/vnstat -u/d" $$CRONTAB true endef diff --git a/net/vnstat/patches/002-no_install_strip.patch b/net/vnstat/patches/002-no_install_strip.patch new file mode 100644 index 000000000..03359157e --- /dev/null +++ b/net/vnstat/patches/002-no_install_strip.patch @@ -0,0 +1,36 @@ +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 @@ + + # install everything else + install -d -m 755 $(BIN) $(SBIN) $(MAN)/man1 $(MAN)/man5 $(DESTDIR)/var/lib/vnstat +- install -s -m 755 src/vnstat $(BIN) +- install -s -m 755 src/vnstatd $(SBIN) ++ install -m 755 src/vnstat $(BIN) ++ install -m 755 src/vnstatd $(SBIN) + @if [ -f "src/vnstati" ]; \ +- then echo install -s -m 755 src/vnstati $(BIN); \ +- install -s -m 755 src/vnstati $(BIN); \ ++ then echo install -m 755 src/vnstati $(BIN); \ ++ install -m 755 src/vnstati $(BIN); \ + fi + + # update man pages, gzip it if previous version was done so +@@ -127,12 +127,12 @@ + + # install binaries + install -dm 755 $(DESTDIR)/var/db/vnstat +- install -s -m 755 src/vnstat $(BIN_BSD) +- install -s -m 755 src/vnstatd $(SBIN_BSD) ++ install -m 755 src/vnstat $(BIN_BSD) ++ install -m 755 src/vnstatd $(SBIN_BSD) + + @if [ -f "src/vnstati" ]; \ +- then echo install -s -m 755 src/vnstati $(BIN_BSD); \ +- install -s -m 755 src/vnstati $(BIN_BSD); \ ++ then echo install -m 755 src/vnstati $(BIN_BSD); \ ++ install -m 755 src/vnstati $(BIN_BSD); \ + fi + + # install default config if such doesn't exist -- 2.30.2