Convert monit to new packaging style
[openwrt.git] / package / monit / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=monit
6 PKG_VERSION:=4.5.1
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=0f054ac39822b4be71789d49e4813754
9
10 PKG_SOURCE_URL:=http://www.tildeslash.com/monit/dist/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,MONIT,monit,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
22 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
23 $(TARGET_CONFIGURE_OPTS) \
24 CFLAGS="$(TARGET_CFLAGS)" \
25 ./configure \
26 --target=$(GNU_TARGET_NAME) \
27 --host=$(GNU_TARGET_NAME) \
28 --build=$(GNU_HOST_NAME) \
29 --program-prefix="" \
30 --program-suffix="" \
31 --prefix=/usr \
32 --exec-prefix=/usr \
33 --bindir=/usr/sbin \
34 --datadir=/usr/share \
35 --includedir=/usr/include \
36 --infodir=/usr/share/info \
37 --libdir=/usr/lib \
38 --libexecdir=/usr/lib \
39 --localstatedir=/var \
40 --mandir=/usr/share/man \
41 --sbindir=/usr/sbin \
42 --sysconfdir=/etc \
43 $(DISABLE_LARGEFILE) \
44 $(DISABLE_NLS) \
45 --without-ssl \
46 );
47 touch $(PKG_BUILD_DIR)/.configured
48
49 $(PKG_BUILD_DIR)/.built:
50 $(MAKE) -C $(PKG_BUILD_DIR)
51 mkdir -p $(PKG_INSTALL_DIR)
52 $(MAKE) -C $(PKG_BUILD_DIR) \
53 DESTDIR="$(PKG_INSTALL_DIR)" \
54 install
55 touch $(PKG_BUILD_DIR)/.built
56
57 $(IPKG_MONIT):
58 install -d -m0755 $(IDIR_MONIT)/etc
59 install -m0600 $(PKG_BUILD_DIR)/monitrc $(IDIR_MONIT)/etc/
60 install -d -m0755 $(IDIR_MONIT)/etc/init.d
61 install -m0755 ./files/monit.init $(IDIR_MONIT)/etc/init.d/monit
62 install -d -m0755 $(IDIR_MONIT)/usr/sbin
63 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/monit $(IDIR_MONIT)/usr/sbin/
64 $(RSTRIP) $(IDIR_MONIT)
65 $(IPKG_BUILD) $(IDIR_MONIT) $(PACKAGE_DIR)
This page took 0.057017 seconds and 5 git commands to generate.