source: freewrt/package/monit/Makefile@ 6fc4520e

freewrt_1_0 freewrt_2_0
Last change on this file since 6fc4520e was c8b93bd, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

major package Makefile cleanup. remove mostly-clean, add licence header, always use RSTRIP varibale for stripping, rename some init scripts, indent

git-svn-id: svn://www.freewrt.org/trunk/freewrt@600 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 3.0 KB
Line 
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
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:= monit
10PKG_VERSION:= 4.6
11PKG_RELEASE:= 1
12PKG_MD5SUM:= 4e53aa44e4ca264e61c7c401cee4e697
13
14PKG_SOURCE_URL:= http://www.tildeslash.com/monit/dist/
15PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
16
17include $(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:
26ifneq ($(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 --enable-largefile \
49 --disable-nls \
50 --with-ssl \
51 --with-ssl-dir="$(STAGING_DIR)/usr" \
52 );
53 $(MAKE) -C $(WRKBUILD)
54 ( cd $(WRKBUILD); mv monit monit-ssl; )
55endif
56ifneq ($(FWRT_PACKAGE_MONIT),)
57 ( cd $(WRKBUILD); rm -rf config.{cache,status} ; \
58 $(TARGET_CONFIGURE_OPTS) \
59 CFLAGS="$(TARGET_CFLAGS)" \
60 ./configure \
61 --target=$(GNU_TARGET_NAME) \
62 --host=$(GNU_TARGET_NAME) \
63 --build=$(GNU_HOST_NAME) \
64 --program-prefix="" \
65 --program-suffix="" \
66 --prefix=/usr \
67 --exec-prefix=/usr \
68 --bindir=/usr/sbin \
69 --datadir=/usr/share \
70 --includedir=/usr/include \
71 --infodir=/usr/share/info \
72 --libdir=/usr/lib \
73 --libexecdir=/usr/lib \
74 --localstatedir=/var \
75 --mandir=/usr/share/man \
76 --sbindir=/usr/sbin \
77 --sysconfdir=/etc \
78 --enable-largefile \
79 --disable-nls \
80 --without-ssl \
81 );
82 $(MAKE) -C $(WRKBUILD)
83 ( cd $(WRKBUILD); mv monit monit-nossl; )
84 $(MAKE) -C $(WRKBUILD) clean
85endif
86 touch $@
87
88$(IPKG_MONIT):
89 install -d -m0755 $(IDIR_MONIT)/etc
90 install -m0600 $(WRKBUILD)/monitrc $(IDIR_MONIT)/etc/
91 install -d -m0755 $(IDIR_MONIT)/etc/init.d
92 install -m0755 ./files/monit.init $(IDIR_MONIT)/etc/init.d/monit
93 install -d -m0755 $(IDIR_MONIT)/usr/sbin
94 install -m0755 $(WRKBUILD)/monit-ssl $(IDIR_MONIT)/usr/sbin/monit
95 $(RSTRIP) $(IDIR_MONIT)
96 $(IPKG_BUILD) $(IDIR_MONIT) $(PACKAGE_DIR)
97
98$(IPKG_MONIT_NOSSL):
99 install -d -m0755 $(IDIR_MONIT_NOSSL)/etc
100 install -m0600 $(WRKBUILD)/monitrc $(IDIR_MONIT_NOSSL)/etc/
101 install -d -m0755 $(IDIR_MONIT_NOSSL)/etc/init.d
102 install -m0755 ./files/monit.init $(IDIR_MONIT_NOSSL)/etc/init.d/monit
103 install -d -m0755 $(IDIR_MONIT_NOSSL)/usr/sbin
104 install -m0755 $(WRKBUILD)/monit-nossl $(IDIR_MONIT_NOSSL)/usr/sbin/monit
105 $(RSTRIP) $(IDIR_MONIT_NOSSL)
106 $(IPKG_BUILD) $(IDIR_MONIT_NOSSL) $(PACKAGE_DIR)
Note: See TracBrowser for help on using the repository browser.