2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.tildeslash.com/monit/dist/
16 PKG_MD5SUM:=d3143b0bbd79b53f1b019d2fc1dae656
18 include $(INCLUDE_DIR)/package.mk
20 define Package/monit/Default
22 CATEGORY:=Administration
24 TITLE:=System services monitoring utility
25 URL:=http://www.tildeslash.com/monit
28 define Package/monit/Default/description
29 An utility for monitoring services on a Unix system
33 $(call Package/monit/Default)
35 TITLE+= (with SSL support)
38 define Package/monit/description
39 $(call Package/monit/Default/description)
40 This package is built with SSL support.
43 define Package/monit-nossl
44 $(call Package/monit/Default)
45 TITLE+= (without SSL support)
48 define Package/monit-nossl/description
49 $(call Package/monit/Default/description)
50 This package is built without SSL support.
55 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
56 -$(MAKE) -C $(PKG_BUILD_DIR) clean
57 $(call Build/Configure/Default,$(3))
58 $(MAKE) -C $(PKG_BUILD_DIR)
59 ( cd $(PKG_BUILD_DIR); mv -f monit monit-$(2) )
62 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
64 define Package/$(1)/conffiles
68 define Package/$(1)/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/sbin
74 $(INSTALL_BIN) $(PKG_BUILD_DIR)/monit-$(2) $$(1)/usr/sbin/monit
79 define Build/Configure
85 ifneq ($(SDK)$(CONFIG_PACKAGE_monit),)
87 $(call Build/Template,monit,with-ssl, \
89 --with-ssl-dir="$(STAGING_DIR)/usr" \
93 $(eval $(Build/with-ssl))
95 ifneq ($(SDK)$(CONFIG_PACKAGE_monit-nossl),)
96 define Build/without-ssl
97 $(call Build/Template,monit-nossl,without-ssl, \
102 $(eval $(Build/without-ssl))
104 $(eval $(call BuildPackage,monit))
105 $(eval $(call BuildPackage,monit-nossl))