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.

95 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2006-2014 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:=monit
  9. PKG_VERSION:=5.12.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://mmonit.com/monit/dist
  13. PKG_MD5SUM:=5f5cf4c18b42e8091b49b4e07cf972ce
  14. PKG_LICENSE:=AGPL-3.0
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/monit/Default
  20. SECTION:=admin
  21. CATEGORY:=Administration
  22. DEPENDS:= +libpthread
  23. TITLE:=System services monitoring utility
  24. URL:=http://mmonit.com/monit/
  25. MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
  26. endef
  27. define Package/monit/Default/description
  28. An utility for monitoring services on a Unix system
  29. endef
  30. define Package/monit
  31. $(call Package/monit/Default)
  32. DEPENDS+= +libopenssl
  33. TITLE+= (with SSL support)
  34. VARIANT:=ssl
  35. endef
  36. define Package/monit/description
  37. $(call Package/monit/Default/description)
  38. This package is built with SSL support.
  39. endef
  40. define Package/monit-nossl
  41. $(call Package/monit/Default)
  42. TITLE+= (without SSL support)
  43. VARIANT:=nossl
  44. endef
  45. define Package/monit-nossl/description
  46. $(call Package/monit/Default/description)
  47. This package is built without SSL support.
  48. endef
  49. CONFIGURE_ARGS += \
  50. --without-pam \
  51. libmonit_cv_setjmp_available=yes \
  52. libmonit_cv_vsnprintf_c99_conformant=yes
  53. ifeq ($(BUILD_VARIANT),ssl)
  54. CONFIGURE_ARGS += \
  55. --with-ssl \
  56. --with-ssl-dir="$(STAGING_DIR)/usr"
  57. endif
  58. ifeq ($(BUILD_VARIANT),nossl)
  59. CONFIGURE_ARGS += \
  60. --without-ssl
  61. endif
  62. define Package/monit/conffiles
  63. /etc/monitrc
  64. endef
  65. define Package/monit/install
  66. $(INSTALL_DIR) $(1)/etc
  67. $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/
  68. $(INSTALL_DIR) $(1)/etc/init.d
  69. $(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit
  70. $(INSTALL_DIR) $(1)/usr/bin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/monit $(1)/usr/bin/
  72. endef
  73. Package/monit-nossl/conffiles = $(Package/monit/conffiles)
  74. Package/monit-nossl/install = $(Package/monit/install)
  75. $(eval $(call BuildPackage,monit))
  76. $(eval $(call BuildPackage,monit-nossl))