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
)
14 PKG_BUILD_DEPENDS
:= uci
16 include $(INCLUDE_DIR
)/package.mk
18 define Package
/freifunk-watchdog
21 TITLE
:=Freifunk Ad-Hoc watchdog daemon
25 define Package
/freifunk-watchdog
/description
26 A watchdog daemon that monitors wireless interfaces to ensure the correct bssid and channel.
27 The process will initiate a wireless restart
as soon
as it detects a bssid or channel mismatch.
31 mkdir
-p
$(PKG_BUILD_DIR
)
32 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
35 define Build
/Configure
39 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
41 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
42 LDFLAGS
="$(TARGET_LDFLAGS)"
45 define Package
/freifunk-watchdog
/install
46 $(INSTALL_DIR
) $(1)/etc
/init.d
47 $(INSTALL_BIN
) .
/files
/freifunk-watchdog.init
$(1)/etc
/init.d
/freifunk-watchdog
48 $(INSTALL_DIR
) $(1)/usr
/sbin
49 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ffwatchd
$(1)/usr
/sbin
/
50 $(INSTALL_DIR
) $(1)/lib
/upgrade
51 $(INSTALL_DATA
) .
/files
/sysupgrade.hook
$(1)/lib
/upgrade
/kill-ffwatchd.sh
54 $(eval
$(call BuildPackage
,freifunk-watchdog
))