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.

56 lines
1.6 KiB

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