Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Copyright (C) 2009-2012 Jo-Philipp Wich <jow@openwrt.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:=freifunk-watchdog
  9. PKG_RELEASE:=8
  10. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  11. PKG_BUILD_DEPENDS := uci
  12. include $(INCLUDE_DIR)/package.mk
  13. define Package/freifunk-watchdog
  14. SECTION:=luci
  15. CATEGORY:=LuCI
  16. SUBMENU:=9. Freifunk
  17. TITLE:=Freifunk Ad-Hoc watchdog daemon
  18. DEPENDS:=libuci
  19. endef
  20. define Package/freifunk-watchdog/description
  21. A watchdog daemon that monitors wireless interfaces to ensure the correct bssid and channel.
  22. The process will initiate a wireless restart as soon as it detects a bssid or channel mismatch.
  23. endef
  24. define Build/Prepare
  25. mkdir -p $(PKG_BUILD_DIR)
  26. $(CP) ./src/* $(PKG_BUILD_DIR)/
  27. endef
  28. define Build/Configure
  29. endef
  30. define Build/Compile
  31. $(MAKE) -C $(PKG_BUILD_DIR) \
  32. CC="$(TARGET_CC)" \
  33. CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
  34. LDFLAGS="$(TARGET_LDFLAGS)"
  35. endef
  36. define Package/freifunk-watchdog/install
  37. $(INSTALL_DIR) $(1)/etc/init.d
  38. $(INSTALL_BIN) ./files/freifunk-watchdog.init $(1)/etc/init.d/freifunk-watchdog
  39. $(INSTALL_DIR) $(1)/etc/config
  40. $(INSTALL_CONF) ./files/freifunk-watchdog.config $(1)/etc/config/freifunk-watchdog
  41. $(INSTALL_DIR) $(1)/usr/sbin
  42. $(INSTALL_BIN) $(PKG_BUILD_DIR)/ffwatchd $(1)/usr/sbin/
  43. endef
  44. $(eval $(call BuildPackage,freifunk-watchdog))