Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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:=darkstat
  7. PKG_VERSION:=3.0.719
  8. PKG_RELEASE:=4
  9. PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
  10. PKG_LICENSE:=GPL-2.0 BSD-ISC
  11. PKG_LICENSE_FILES:=COPYING.GPL LICENSE
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=http://unix4lyfe.org/darkstat
  14. PKG_HASH:=aeaf909585f7f43dc032a75328fdb62114e58405b06a92a13c0d3653236dedd7
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/darkstat
  18. SECTION:=net
  19. CATEGORY:=Network
  20. DEPENDS:=+libpcap +zlib
  21. TITLE:=Network bandwidth monitor
  22. URL:=http://unix4lyfe.org/darkstat/
  23. endef
  24. define Package/darkstat/description
  25. darkstat is a packet sniffer that runs as a background process on a cable/DSL
  26. router, gathers all sorts of statistics about network usage, and serves them
  27. over HTTP.
  28. endef
  29. define Package/darkstat/conffiles
  30. /etc/config/darkstat
  31. endef
  32. CONFIGURE_ARGS += \
  33. --disable-debug \
  34. --with-chroot-dir=/var/empty
  35. CONFIGURE_VARS += \
  36. ac_cv_search_setproctitle=no \
  37. ac_cv_search_strlcpy=no \
  38. ac_cv_search_strlcat=no
  39. define Build/Compile
  40. $(HOSTCC) $(PKG_BUILD_DIR)/static/c-ify.c \
  41. -o $(PKG_BUILD_DIR)/c-ify
  42. $(call Build/Compile/Default)
  43. endef
  44. define Package/darkstat/install
  45. $(INSTALL_DIR) $(1)/usr/sbin
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/darkstat $(1)/usr/sbin/
  47. $(INSTALL_DIR) $(1)/etc/init.d
  48. $(INSTALL_BIN) ./files/darkstat.init $(1)/etc/init.d/darkstat
  49. $(INSTALL_DIR) $(1)/etc/config
  50. $(INSTALL_CONF) ./files/darkstat.config $(1)/etc/config/darkstat
  51. endef
  52. $(eval $(call BuildPackage,darkstat))