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.

58 lines
1.7 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:=2019-10-08
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_MIRROR_HASH:=0bf82809ce36106825d1a757c4624efcbab1829c1a9bf9e1e055e75ebf83403d
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_URL:=https://github.com/br101/pingcheck
  15. PKG_SOURCE_PROTO:=git
  16. PKG_SOURCE_VERSION:=7223f1b10697735d34f297ca2520495337666df6
  17. PKG_MAINTAINER:=Bruno Randolf <br1@einfach.org>
  18. PKG_LICENSE:=GPL-2.0-or-later
  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. URL:=https://github.com/br101/pingcheck
  29. endef
  30. define Package/pingcheck/description
  31. Checks by using "ping" (ICMP echo) or by opening connections to TCP port 80
  32. wether a configured host (normally on the internet) can be reached via a
  33. specific interface. Then makes this information available via ubus and triggers
  34. "online" and "offline" scripts.
  35. endef
  36. define Package/pingcheck/conffiles
  37. /etc/config/pingcheck
  38. endef
  39. define Package/pingcheck/install
  40. $(INSTALL_DIR) $(1)/usr/sbin
  41. $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/pingcheck $(1)/usr/sbin/
  42. $(INSTALL_DIR) $(1)/etc/init.d
  43. $(INSTALL_BIN) ./pingcheck.init $(1)/etc/init.d/pingcheck
  44. $(INSTALL_DIR) $(1)/etc/config
  45. $(INSTALL_DATA) $(PKG_BUILD_DIR)/pingcheck.config $(1)/etc/config/pingcheck
  46. endef
  47. $(eval $(call BuildPackage,pingcheck))