Update monit to 4.10.1 (#3776)
[packages.git] / admin / monit / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=monit
12 PKG_VERSION:=4.10.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.tildeslash.com/monit/dist/
17 PKG_MD5SUM:=d3143b0bbd79b53f1b019d2fc1dae656
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/monit/Default
22   SECTION:=admin
23   CATEGORY:=Administration
24   DEPENDS:= +libpthread
25   TITLE:=System services monitoring utility
26   URL:=http://www.tildeslash.com/monit
27 endef
28
29 define Package/monit/Default/description
30         An utility for monitoring services on a Unix system
31 endef
32
33 define Package/monit
34 $(call Package/monit/Default)
35   DEPENDS+= +libopenssl
36   TITLE+= (with SSL support)
37 endef
38
39 define Package/monit/description
40 $(call Package/monit/Default/description)
41         This package is built with SSL support.
42 endef
43
44 define Package/monit-nossl
45 $(call Package/monit/Default)
46   TITLE+= (without SSL support)
47 endef
48
49 define Package/monit-nossl/description
50 $(call Package/monit/Default/description)
51         This package is built without SSL support.
52 endef
53
54 define Build/Template
55
56 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
57         -$(MAKE) -C $(PKG_BUILD_DIR) clean
58         $(call Build/Configure/Default,$(3))
59         $(MAKE) -C $(PKG_BUILD_DIR)
60         ( cd $(PKG_BUILD_DIR); mv -f monit monit-$(2) )
61         touch $$@
62
63 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
64
65 define Package/$(1)/conffiles
66 /etc/monitrc
67 endef
68
69 define Package/$(1)/install
70         $(INSTALL_DIR) $$(1)/etc
71         $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $$(1)/etc/
72         $(INSTALL_DIR) $$(1)/etc/init.d
73         $(INSTALL_BIN) ./files/monit.init $$(1)/etc/init.d/monit
74         $(INSTALL_DIR) $$(1)/usr/sbin
75         $(INSTALL_BIN) $(PKG_BUILD_DIR)/monit-$(2) $$(1)/usr/sbin/monit
76 endef
77
78 endef
79
80 define Build/Configure
81 endef
82
83 define Build/Compile
84 endef
85
86 ifneq ($(SDK)$(CONFIG_PACKAGE_monit),)
87   define Build/with-ssl
88     $(call Build/Template,monit,with-ssl, \
89         --with-ssl \
90         --with-ssl-dir="$(STAGING_DIR)/usr" \
91     )
92   endef
93 endif
94 $(eval $(Build/with-ssl))
95
96 ifneq ($(SDK)$(CONFIG_PACKAGE_monit-nossl),)
97   define Build/without-ssl
98     $(call Build/Template,monit-nossl,without-ssl, \
99         --without-ssl \
100     )  
101   endef
102 endif
103 $(eval $(Build/without-ssl))
104
105 $(eval $(call BuildPackage,monit))
106 $(eval $(call BuildPackage,monit-nossl))