add a patch to prevent the wrapper from linking when generating dep files
[openwrt/svn-archive/archive.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.9
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:=bcbaab776a54d1e34e3a057c925de9ca
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
55 define Build/Template
56
57 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
58 -$(MAKE) -C $(PKG_BUILD_DIR) clean
59 $(call Build/Configure/Default,$(3))
60 $(MAKE) -C $(PKG_BUILD_DIR)
61 ( cd $(PKG_BUILD_DIR); mv -f monit monit-$(2) )
62 touch $$@
63
64 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
65
66 define Package/$(1)/conffiles
67 /etc/monitrc
68 endef
69
70 define Package/$(1)/install
71 $(INSTALL_DIR) $$(1)/etc
72 $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $$(1)/etc/
73 $(INSTALL_DIR) $$(1)/etc/init.d
74 $(INSTALL_BIN) ./files/monit.init $$(1)/etc/init.d/monit
75 $(INSTALL_DIR) $$(1)/usr/sbin
76 $(INSTALL_BIN) $(PKG_BUILD_DIR)/monit-$(2) $$(1)/usr/sbin/monit
77 endef
78
79 endef
80
81
82 define Build/Configure
83 endef
84
85 define Build/Compile
86 endef
87
88 ifneq ($(SDK)$(CONFIG_PACKAGE_monit),)
89 define Build/with-ssl
90 $(call Build/Template,monit,with-ssl, \
91 --with-ssl \
92 --with-ssl-dir="$(STAGING_DIR)/usr" \
93 )
94 endef
95 endif
96 $(eval $(Build/with-ssl))
97
98 ifneq ($(SDK)$(CONFIG_PACKAGE_monit-nossl),)
99 define Build/without-ssl
100 $(call Build/Template,monit-nossl,without-ssl, \
101 --without-ssl \
102 )
103 endef
104 endif
105 $(eval $(Build/without-ssl))
106
107 $(eval $(call BuildPackage,monit))
108 $(eval $(call BuildPackage,monit-nossl))