1
0

Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # Copyright (C) 2007-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=darkstat
  9. PKG_VERSION:=3.0.719
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
  12. PKG_LICENSE:=GPL-2.0 BSD-ISC
  13. PKG_LICENSE_FILES:=COPYING.GPL LICENSE
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  15. PKG_SOURCE_URL:=http://unix4lyfe.org/darkstat
  16. PKG_MD5SUM:=963145de05cb21f4d93a9c244beeaea0
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/darkstat
  20. SECTION:=net
  21. CATEGORY:=Network
  22. DEPENDS:=+libpcap +zlib
  23. TITLE:=Network bandwidth monitor
  24. URL:=http://unix4lyfe.org/darkstat/
  25. endef
  26. define Package/darkstat/description
  27. darkstat is a packet sniffer that runs as a background process on a cable/DSL
  28. router, gathers all sorts of statistics about network usage, and serves them
  29. over HTTP.
  30. endef
  31. define Package/darkstat/conffiles
  32. /etc/config/darkstat
  33. endef
  34. CONFIGURE_ARGS += \
  35. --disable-debug \
  36. --with-chroot-dir=/var/empty
  37. TARGET_CFLAGS += -std=gnu99
  38. define Build/Compile
  39. $(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
  40. -o $(PKG_BUILD_DIR)/c-ify
  41. $(call Build/Compile/Default)
  42. endef
  43. define Package/darkstat/install
  44. $(INSTALL_DIR) $(1)/usr/sbin
  45. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/darkstat $(1)/usr/sbin/
  46. $(INSTALL_DIR) $(1)/etc/init.d
  47. $(INSTALL_BIN) ./files/darkstat.init $(1)/etc/init.d/darkstat
  48. $(INSTALL_DIR) $(1)/etc/config
  49. $(INSTALL_CONF) ./files/darkstat.config $(1)/etc/config/darkstat
  50. endef
  51. $(eval $(call BuildPackage,darkstat))