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.

98 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.26.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://mmonit.com/monit/dist
  13. PKG_HASH:=87fc4568a3af9a2be89040efb169e3a2e47b262f99e78d5ddde99dd89f02f3c2
  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. ac_cv_ipv6=$(if $(CONFIG_IPV6),yes,no) \
  54. libmonit_cv_setjmp_available=yes \
  55. libmonit_cv_vsnprintf_c99_conformant=yes
  56. ifeq ($(BUILD_VARIANT),ssl)
  57. CONFIGURE_ARGS += \
  58. --with-ssl \
  59. --with-ssl-dir="$(STAGING_DIR)/usr"
  60. endif
  61. ifeq ($(BUILD_VARIANT),nossl)
  62. CONFIGURE_ARGS += \
  63. --without-ssl
  64. endif
  65. define Package/monit/conffiles
  66. /etc/monitrc
  67. endef
  68. define Package/monit/install
  69. $(INSTALL_DIR) $(1)/etc
  70. $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/
  71. $(INSTALL_DIR) $(1)/etc/init.d
  72. $(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit
  73. $(INSTALL_DIR) $(1)/usr/bin
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/monit $(1)/usr/bin/
  75. endef
  76. Package/monit-nossl/conffiles = $(Package/monit/conffiles)
  77. Package/monit-nossl/install = $(Package/monit/install)
  78. $(eval $(call BuildPackage,monit))
  79. $(eval $(call BuildPackage,monit-nossl))