You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2010-2011 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:=foolsm
  9. PKG_VERSION:=1.0.13
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://lsm.foobar.fi/download
  13. PKG_HASH:=4eeda0e666e8ee93aab9b9c6709e9695e042dc391fb0999280874c8a73bce476
  14. PKG_MAINTAINER:=
  15. PKG_LICENSE:=GPL-2.0-only
  16. PKG_INSTALL:=1
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/foolsm
  20. SECTION:=net
  21. CATEGORY:=Network
  22. DEPENDS:=+ssmtp
  23. TITLE:=A link state monitor
  24. URL:=http://lsm.foobar.fi/
  25. endef
  26. define Package/foolsm/description
  27. foolsm is a link state monitor for carrying out actions when a link
  28. transistions from the up to down state or vice versa.
  29. endef
  30. define Package/foolsm/conffiles
  31. /etc/foolsm/foolsm.conf
  32. endef
  33. MAKE_FLAGS += \
  34. PREFIX="$(CONFIGURE_PREFIX)"
  35. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  36. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  37. define Package/foolsm/install
  38. $(INSTALL_DIR) $(1)/usr/sbin
  39. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/foolsm $(1)/usr/sbin/
  40. $(INSTALL_DIR) $(1)/etc/foolsm/script.d
  41. $(INSTALL_DIR) $(1)/etc/init.d
  42. $(INSTALL_DATA) ./files/connections.conf $(1)/etc/foolsm/connections.conf
  43. $(INSTALL_DATA) ./files/foolsm.conf $(1)/etc/foolsm/foolsm.conf
  44. $(INSTALL_BIN) ./files/foolsm_script $(1)/etc/foolsm/script
  45. $(INSTALL_BIN) ./files/foolsm.init $(1)/etc/init.d/foolsm
  46. endef
  47. define Package/foolsm/conffiles
  48. /etc/foolsm/connections.conf
  49. /etc/foolsm/foolsm.conf
  50. endef
  51. $(eval $(call BuildPackage,foolsm))