2 # Copyright (C) 2006 OpenWrt.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
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://lsm.foobar.fi/download
16 PKG_MD5SUM:=983911b434a3c649fcefdc99e6ea2f37
18 include $(INCLUDE_DIR)/package.mk
24 TITLE:=A link state monitor
25 URL:=http://lsm.foobar.fi/
28 define Package/lsm/description
29 lsm is a link state monitor for carrying out actions when a link
30 transistions from the up to down state or vice versa.
33 define Package/lsm/conffiles
38 $(call Build/Prepare/Default)
39 rmdir $(PKG_BUILD_DIR)
40 mv $(BUILD_DIR)/lsm $(PKG_BUILD_DIR)
44 echo sed -ie 's/\$$$$(CC)/mipsel-openwrt-linux-uclibc-gcc/g' $(PKG_BUILD_DIR)/Makefile
45 $(MAKE) -C $(PKG_BUILD_DIR) CC=$(TARGET_CC)
48 define Package/lsm/install
49 $(INSTALL_DIR) $(1)/usr/sbin
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lsm $(1)/usr/sbin/
51 $(INSTALL_DIR) $(1)/etc/lsm
52 $(INSTALL_DIR) $(1)/etc/lsm/script.d
53 $(INSTALL_DIR) $(1)/etc/init.d
54 $(INSTALL_DATA) ./files/lsm.conf $(1)/etc/lsm/lsm.conf
55 $(INSTALL_BIN) ./files/lsm_script $(1)/etc/lsm/script
56 $(INSTALL_BIN) ./files/lsm.init $(1)/etc/init.d/lsm
59 $(eval $(call BuildPackage,lsm))