Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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.24.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_HASH:=754d1f0e165e5a26d4639a6a83f44ccf839e381f2622e0946d5302fa1f2d2414
  13. PKG_SOURCE_URL:=https://mmonit.com/monit/dist
  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 +zlib
  23. TITLE:=System services monitoring utility
  24. URL:=https://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))