[packages] quagga-unstable: Implement BGP confederation error handling (RFC5065,...
[openwrt/svn-archive/archive.git] / admin / monit / Makefile
1 #
2 # Copyright (C) 2006-2009 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.0.3
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://mmonit.com/monit/dist/
16 PKG_MD5SUM:=dae7859ec10551fc941daeae60dee9d3
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/monit/Default
21 SECTION:=admin
22 CATEGORY:=Administration
23 DEPENDS:= +libpthread
24 TITLE:=System services monitoring utility
25 URL:=http://mmonit.com/monit/
26 endef
27
28 define Package/monit/Default/description
29 An utility for monitoring services on a Unix system
30 endef
31
32 define Package/monit
33 $(call Package/monit/Default)
34 DEPENDS+= +libopenssl
35 TITLE+= (with SSL support)
36 endef
37
38 define Package/monit/description
39 $(call Package/monit/Default/description)
40 This package is built with SSL support.
41 endef
42
43 define Package/monit-nossl
44 $(call Package/monit/Default)
45 TITLE+= (without SSL support)
46 endef
47
48 define Package/monit-nossl/description
49 $(call Package/monit/Default/description)
50 This package is built without SSL support.
51 endef
52
53 define Build/Template
54
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) )
60 touch $$@
61
62 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
63
64 define Package/$(1)/conffiles
65 /etc/monitrc
66 endef
67
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
75 endef
76
77 endef
78
79 define Build/Configure
80 endef
81
82 define Build/Compile
83 endef
84
85 ifneq ($(SDK)$(CONFIG_PACKAGE_monit),)
86 define Build/with-ssl
87 $(call Build/Template,monit,with-ssl, \
88 --with-ssl \
89 --with-ssl-dir="$(STAGING_DIR)/usr" \
90 )
91 endef
92 endif
93 $(eval $(Build/with-ssl))
94
95 ifneq ($(SDK)$(CONFIG_PACKAGE_monit-nossl),)
96 define Build/without-ssl
97 $(call Build/Template,monit-nossl,without-ssl, \
98 --without-ssl \
99 )
100 endef
101 endif
102 $(eval $(Build/without-ssl))
103
104 $(eval $(call BuildPackage,monit))
105 $(eval $(call BuildPackage,monit-nossl))