Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Copyright (C) 2015 Bruno Randolf (br1@einfach.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:=pingcheck
  9. PKG_VERSION:=0.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=https://github.com/br101/pingcheck.git
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=0f099998782f550e2abebdc65bcc3e969b798769
  16. PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>
  17. PKG_LICENSE:=GPL-2.0+
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/pingcheck
  22. SECTION:=net
  23. CATEGORY:=Network
  24. DEPENDS:=+libubus +libuci
  25. MAINTAINER:=Bruno Randolf <br1@einfach.org>
  26. TITLE:=Check Internet and interface connectivity
  27. endef
  28. define Package/pingcheck/description
  29. Checks by using "ping" (ICMP echo) wether a configured host (normally on the
  30. internet) can be reached via a specific interface. Then makes this information
  31. available via ubus and triggers "online" and "offline" scripts.
  32. endef
  33. define Package/pingcheck/conffiles
  34. /etc/config/pingcheck
  35. endef
  36. define Package/pingcheck/install
  37. $(INSTALL_DIR) $(1)/usr/sbin
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/pingcheck $(1)/usr/sbin/
  39. $(INSTALL_DIR) $(1)/etc/init.d
  40. $(INSTALL_BIN) ./pingcheck.init $(1)/etc/init.d/pingcheck
  41. $(INSTALL_DIR) $(1)/etc/config
  42. $(INSTALL_DATA) $(PKG_BUILD_DIR)/pingcheck.config $(1)/etc/config/pingcheck
  43. endef
  44. $(eval $(call BuildPackage,pingcheck))