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