You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.5 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=vnstat2
  7. PKG_VERSION:=2.9
  8. PKG_RELEASE:=$(AUTORELEASE)
  9. PKG_SOURCE:=vnstat-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://humdi.net/vnstat
  11. PKG_HASH:=11a21475dea91706500aba7c63e24126703fd01f13b1f3acdf92baa5aead9dc7
  12. PKG_LICENSE:=GPL-2.0-only
  13. PKG_LICENSE_FILES:=COPYING
  14. PKG_MAINTAINER:=Jan Hoffmann <jan@3e8.eu>
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/vnstat-${PKG_VERSION}
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/vnstat2/Default
  21. SECTION:=net
  22. CATEGORY:=Network
  23. URL:=https://humdi.net/vnstat/
  24. DEPENDS:=+libsqlite3
  25. CONFLICTS:=vnstat
  26. endef
  27. define Package/vnstat2
  28. $(call Package/vnstat2/Default)
  29. TITLE:=Console-based network traffic monitor
  30. endef
  31. define Package/vnstat2/description
  32. vnStat is a network traffic monitor for Linux that keeps a log of daily
  33. network traffic for the selected interface(s). vnStat isn't a packet
  34. sniffer. The traffic information is analyzed from the /proc -filesystem,
  35. so vnStat can be used without root permissions.
  36. endef
  37. define Package/vnstati2
  38. $(call Package/vnstat2/Default)
  39. DEPENDS+=vnstat2 +libgd
  40. TITLE:=PNG image output support for vnStat
  41. endef
  42. define Package/vnstati2/description
  43. The purpose of vnstati is to provide image output support for statistics
  44. collected using vnstat. However, the image file format is limited to
  45. png. All basic outputs of vnStat are supported excluding live traffic
  46. features. The image can be outputted either to a file or to standard
  47. output.
  48. endef
  49. define Package/vnstat2/conffiles
  50. /etc/vnstat.conf
  51. /etc/config/vnstat
  52. endef
  53. CONFIGURE_ARGS += --disable-extra-paths
  54. define Package/vnstat2/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(CP) $(PKG_INSTALL_DIR)/usr/bin/vnstat $(1)/usr/bin/
  57. $(INSTALL_DIR) $(1)/usr/sbin
  58. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vnstatd $(1)/usr/sbin/
  59. $(INSTALL_DIR) $(1)/etc
  60. $(INSTALL_CONF) $(PKG_BUILD_DIR)/cfg/vnstat.conf $(1)/etc/
  61. $(INSTALL_DIR) $(1)/etc/config
  62. $(INSTALL_CONF) ./files/vnstat.config $(1)/etc/config/vnstat
  63. $(INSTALL_DIR) $(1)/etc/init.d
  64. $(INSTALL_BIN) ./files/vnstat.init $(1)/etc/init.d/vnstat
  65. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  66. $(INSTALL_DATA) ./files/vnstat.hotplug $(1)/etc/hotplug.d/iface/50-vnstat
  67. endef
  68. define Package/vnstati2/install
  69. $(INSTALL_DIR) $(1)/usr/bin
  70. $(CP) $(PKG_INSTALL_DIR)/usr/bin/vnstati $(1)/usr/bin/
  71. endef
  72. $(eval $(call BuildPackage,vnstat2))
  73. $(eval $(call BuildPackage,vnstati2))