source: packages/admin/monit/Makefile @ 28887

Last change on this file since 28887 was 28887, checked in by nico, 4 years ago

packages/monit: use new service functions, fix /etc/monitrc permissions

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1#
2# Copyright (C) 2006-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=monit
11PKG_VERSION:=5.2.5
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://mmonit.com/monit/dist
16PKG_MD5SUM:=862fb7939ad6f73fc0cc82096c2309c7
17
18PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
19PKG_INSTALL:=1
20
21include $(INCLUDE_DIR)/package.mk
22
23define Package/monit/Default
24  SECTION:=admin
25  CATEGORY:=Administration
26  DEPENDS:= +libpthread
27  TITLE:=System services monitoring utility
28  URL:=http://mmonit.com/monit/
29endef
30
31define Package/monit/Default/description
32        An utility for monitoring services on a Unix system
33endef
34
35define Package/monit
36$(call Package/monit/Default)
37  DEPENDS+= +libopenssl
38  TITLE+= (with SSL support)
39  VARIANT:=ssl
40endef
41
42define Package/monit/description
43$(call Package/monit/Default/description)
44        This package is built with SSL support.
45endef
46
47define Package/monit-nossl
48$(call Package/monit/Default)
49  TITLE+= (without SSL support)
50  VARIANT:=nossl
51endef
52
53define Package/monit-nossl/description
54$(call Package/monit/Default/description)
55        This package is built without SSL support.
56endef
57
58ifeq ($(BUILD_VARIANT),ssl)
59        CONFIGURE_ARGS += \
60                --with-ssl \
61                --with-ssl-dir="$(STAGING_DIR)/usr"
62endif
63
64ifeq ($(BUILD_VARIANT),nossl)
65        CONFIGURE_ARGS += \
66                --without-ssl
67endif
68
69define Package/monit/conffiles
70/etc/monitrc
71endef
72
73define Package/monit/install
74        $(INSTALL_DIR) $(1)/etc
75        $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/
76        $(INSTALL_DIR) $(1)/etc/init.d
77        $(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit
78        $(INSTALL_DIR) $(1)/usr/bin
79        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/monit $(1)/usr/bin/
80endef
81
82Package/monit-nossl/conffiles = $(Package/monit/conffiles)
83Package/monit-nossl/install = $(Package/monit/install)
84
85$(eval $(call BuildPackage,monit))
86$(eval $(call BuildPackage,monit-nossl))
Note: See TracBrowser for help on using the repository browser.