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.

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