2 # Copyright (C) 2009 Jo-Philipp Wich <xm@subsignal.org>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
10 PKG_NAME:=freifunk-watchdog
13 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
15 include $(INCLUDE_DIR)/package.mk
17 define Package/freifunk-watchdog
20 TITLE:=Freifunk Ad-Hoc watchdog daemon
23 define Package/freifunk-watchdog/description
24 A watchdog daemon that monitors wireless interfaces to ensure the correct bssid and channel.
25 The process will initiate a wireless restart as soon as it detects a bssid or channel mismatch.
29 mkdir -p $(PKG_BUILD_DIR)
30 $(CP) ./src/* $(PKG_BUILD_DIR)/
33 define Build/Configure
37 $(MAKE) -C $(PKG_BUILD_DIR) \
39 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
40 LDFLAGS="$(TARGET_LDFLAGS)"
43 define Package/freifunk-watchdog/install
44 $(INSTALL_DIR) $(1)/etc/init.d
45 $(INSTALL_BIN) ./files/freifunk-watchdog.init $(1)/etc/init.d/freifunk-watchdog
46 $(INSTALL_DIR) $(1)/usr/sbin
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ffwatchd $(1)/usr/sbin/
50 $(eval $(call BuildPackage,freifunk-watchdog))