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:=2017-10-02
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_MIRROR_HASH:=511a6bedd65169ffd1aadb38dd470d53d445cffcc3a322ec2dd0dee6009162a6
  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:=12e65e2f3fd2a17db785d28756df43ccade29b1b
  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. 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))