| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= monit
|
|---|
| 10 | PKG_VERSION:= 4.6
|
|---|
| 11 | PKG_RELEASE:= 2
|
|---|
| 12 | PKG_MD5SUM:= 4e53aa44e4ca264e61c7c401cee4e697
|
|---|
| 13 | PKG_INIT:= 50
|
|---|
| 14 |
|
|---|
| 15 | PKG_SOURCE_URL:= http://www.tildeslash.com/monit/dist/
|
|---|
| 16 |
|
|---|
| 17 | include $(TOPDIR)/mk/package.mk
|
|---|
| 18 |
|
|---|
| 19 | $(eval $(call PKG_template,MONIT,monit,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 20 | $(eval $(call PKG_template,MONIT_NOSSL,monit-nossl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 21 |
|
|---|
| 22 | $(WRKBUILD)/.configured:
|
|---|
| 23 | touch $@
|
|---|
| 24 |
|
|---|
| 25 | $(WRKBUILD)/.built:
|
|---|
| 26 | ifneq ($(FWRT_PACKAGE_MONIT),)
|
|---|
| 27 | ( cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 28 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 29 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 30 | ./configure \
|
|---|
| 31 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 32 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 33 | --build=$(GNU_HOST_NAME) \
|
|---|
| 34 | --program-prefix="" \
|
|---|
| 35 | --program-suffix="" \
|
|---|
| 36 | --prefix=/usr \
|
|---|
| 37 | --exec-prefix=/usr \
|
|---|
| 38 | --bindir=/usr/sbin \
|
|---|
| 39 | --datadir=/usr/share \
|
|---|
| 40 | --includedir=/usr/include \
|
|---|
| 41 | --infodir=/usr/share/info \
|
|---|
| 42 | --libdir=/usr/lib \
|
|---|
| 43 | --libexecdir=/usr/lib \
|
|---|
| 44 | --localstatedir=/var \
|
|---|
| 45 | --mandir=/usr/share/man \
|
|---|
| 46 | --sbindir=/usr/sbin \
|
|---|
| 47 | --sysconfdir=/etc \
|
|---|
| 48 | --disable-nls \
|
|---|
| 49 | --with-ssl \
|
|---|
| 50 | --with-ssl-dir="$(STAGING_DIR)/usr" \
|
|---|
| 51 | );
|
|---|
| 52 | $(MAKE) -C $(WRKBUILD)
|
|---|
| 53 | ( cd $(WRKBUILD); mv monit monit-ssl; )
|
|---|
| 54 | endif
|
|---|
| 55 | ifneq ($(FWRT_PACKAGE_MONIT_NOSSL),)
|
|---|
| 56 | ( cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 57 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 58 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 59 | ./configure \
|
|---|
| 60 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 61 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 62 | --build=$(GNU_HOST_NAME) \
|
|---|
| 63 | --program-prefix="" \
|
|---|
| 64 | --program-suffix="" \
|
|---|
| 65 | --prefix=/usr \
|
|---|
| 66 | --exec-prefix=/usr \
|
|---|
| 67 | --bindir=/usr/sbin \
|
|---|
| 68 | --datadir=/usr/share \
|
|---|
| 69 | --includedir=/usr/include \
|
|---|
| 70 | --infodir=/usr/share/info \
|
|---|
| 71 | --libdir=/usr/lib \
|
|---|
| 72 | --libexecdir=/usr/lib \
|
|---|
| 73 | --localstatedir=/var \
|
|---|
| 74 | --mandir=/usr/share/man \
|
|---|
| 75 | --sbindir=/usr/sbin \
|
|---|
| 76 | --sysconfdir=/etc \
|
|---|
| 77 | --disable-nls \
|
|---|
| 78 | --without-ssl \
|
|---|
| 79 | );
|
|---|
| 80 | $(MAKE) -C $(WRKBUILD)
|
|---|
| 81 | ( cd $(WRKBUILD); mv monit monit-nossl; )
|
|---|
| 82 | $(MAKE) -C $(WRKBUILD) clean
|
|---|
| 83 | endif
|
|---|
| 84 | touch $@
|
|---|
| 85 |
|
|---|
| 86 | $(IPKG_MONIT):
|
|---|
| 87 | $(INSTALL_DIR) $(IDIR_MONIT)/etc/init.d
|
|---|
| 88 | $(INSTALL_DIR) $(IDIR_MONIT)/usr/sbin
|
|---|
| 89 | install -m0600 $(WRKBUILD)/monitrc $(IDIR_MONIT)/etc/
|
|---|
| 90 | $(INSTALL_BIN) ./files/monit.init \
|
|---|
| 91 | $(IDIR_MONIT)/etc/init.d/S$(PKG_INIT)monit
|
|---|
| 92 | $(INSTALL_BIN) $(WRKBUILD)/monit-ssl $(IDIR_MONIT)/usr/sbin/monit
|
|---|
| 93 | $(RSTRIP) $(IDIR_MONIT)
|
|---|
| 94 | $(IPKG_BUILD) $(IDIR_MONIT) $(PACKAGE_DIR)
|
|---|
| 95 |
|
|---|
| 96 | $(IPKG_MONIT_NOSSL):
|
|---|
| 97 | echo $(IDIR_MONIT_NOSSL)
|
|---|
| 98 | $(INSTALL_DIR) $(IDIR_MONIT_NOSSL)/etc/init.d
|
|---|
| 99 | $(INSTALL_DIR) $(IDIR_MONIT_NOSSL)/usr/sbin
|
|---|
| 100 | install -m0600 $(WRKBUILD)/monitrc $(IDIR_MONIT_NOSSL)/etc/
|
|---|
| 101 | $(INSTALL_BIN) ./files/monit.init \
|
|---|
| 102 | $(IDIR_MONIT_NOSSL)/etc/init.d/S$(PKG_INIT)monit
|
|---|
| 103 | $(INSTALL_BIN) $(WRKBUILD)/monit-nossl $(IDIR_MONIT_NOSSL)/usr/sbin/monit
|
|---|
| 104 | $(RSTRIP) $(IDIR_MONIT_NOSSL)
|
|---|
| 105 | $(IPKG_BUILD) $(IDIR_MONIT_NOSSL) $(PACKAGE_DIR)
|
|---|