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