Rename patches to match conventions, second round; *ouch*
[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.6
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=4e53aa44e4ca264e61c7c401cee4e697
15
16 PKG_SOURCE_URL:=http://www.tildeslash.com/monit/dist/
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/monit
25 SECTION:=admin
26 CATEGORY:=Administration
27 DEPENDS:=+libpthread +libopenssl
28 TITLE:=System services monitoring utility, with SSL support
29 DESCRIPTION:=An utility for monitoring services on a Unix system\\\
30 This package is built with SSL support.\\\
31 URL:=http://www.tildeslash.com/monit
32 endef
33
34 define Package/monit/conffiles
35 /etc/monitrc
36 endef
37
38 define Package/monit-nossl
39 SECTION:=admin
40 CATEGORY:=Administration
41 TITLE:=System services monitoring utility, without SSL support
42 DESCRIPTION:=An utility for monitoring services on a Unix system.\\\
43 This package is built without SSL support.\\\
44 URL:=http://www.tildeslash.com/monit
45 endef
46
47 define Package/monit/conffiles
48 /etc/monitrc
49 endef
50
51 define Build/Configure
52 $(call Build/Configure/Default,--with-ssl \
53 --with-ssl-dir="$(STAGING_DIR)/usr" \
54 )
55 $(MAKE) -C $(PKG_BUILD_DIR)
56 mv $(PKG_BUILD_DIR)/monit $(PKG_BUILD_DIR)/monit-ssl
57 $(MAKE) -C $(PKG_BUILD_DIR) clean
58 $(call Build/Configure/Default,--without-ssl)
59 endef
60
61 define Build/Compile
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 clean all
64 mv $(PKG_BUILD_DIR)/monit $(PKG_BUILD_DIR)/monit-nossl
65 endef
66
67 define Package/monit/install
68 $(INSTALL_DIR) $(1)/etc
69 $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/
70 $(INSTALL_DIR) $(1)/etc/init.d
71 $(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit
72 $(INSTALL_DIR) $(1)/usr/sbin
73 $(INSTALL_BIN) $(PKG_BUILD_DIR)/monit-ssl $(1)/usr/sbin/monit
74 endef
75
76 define Package/monit-nossl/install
77 $(INSTALL_DIR) $(1)/etc
78 $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/
79 $(INSTALL_DIR) $(1)/etc/init.d
80 $(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit
81 $(INSTALL_DIR) $(1)/usr/sbin
82 $(INSTALL_BIN) $(PKG_BUILD_DIR)/monit-nossl $(1)/usr/sbin/monit
83 endef
84
85 $(eval $(call BuildPackage,monit))
86 $(eval $(call BuildPackage,monit-nossl))