source: freewrt/package/monit/Makefile@ d419478

freewrt_1_0 freewrt_2_0
Last change on this file since d419478 was d419478, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

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

  • Property mode set to 100644
File size: 2.9 KB
Line 
1# $Id: Makefile 2193 2005-10-20 09:09:55Z nico $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=monit
6PKG_VERSION:=4.6
7PKG_RELEASE:=1
8PKG_MD5SUM:=4e53aa44e4ca264e61c7c401cee4e697
9
10PKG_SOURCE_URL:=http://www.tildeslash.com/monit/dist/
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12
13
14include $(TOPDIR)/package/rules.mk
15
16$(eval $(call PKG_template,MONIT,monit,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
17$(eval $(call PKG_template,MONIT_NOSSL,monit-nossl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
18
19$(WRKBUILD)/.configured:
20 touch $@
21
22$(WRKBUILD)/.built:
23ifneq ($(BR2_PACKAGE_MONIT),)
24 ( cd $(WRKBUILD); rm -rf config.{cache,status} ; \
25 $(TARGET_CONFIGURE_OPTS) \
26 CFLAGS="$(TARGET_CFLAGS)" \
27 ./configure \
28 --target=$(GNU_TARGET_NAME) \
29 --host=$(GNU_TARGET_NAME) \
30 --build=$(GNU_HOST_NAME) \
31 --program-prefix="" \
32 --program-suffix="" \
33 --prefix=/usr \
34 --exec-prefix=/usr \
35 --bindir=/usr/sbin \
36 --datadir=/usr/share \
37 --includedir=/usr/include \
38 --infodir=/usr/share/info \
39 --libdir=/usr/lib \
40 --libexecdir=/usr/lib \
41 --localstatedir=/var \
42 --mandir=/usr/share/man \
43 --sbindir=/usr/sbin \
44 --sysconfdir=/etc \
45 --enable-largefile \
46 --disable-nls \
47 --with-ssl \
48 --with-ssl-dir="$(STAGING_DIR)/usr" \
49 );
50 $(MAKE) -C $(WRKBUILD)
51 ( cd $(WRKBUILD); mv monit monit-ssl; )
52endif
53ifneq ($(BR2_PACKAGE_MONIT),)
54 ( cd $(WRKBUILD); rm -rf config.{cache,status} ; \
55 $(TARGET_CONFIGURE_OPTS) \
56 CFLAGS="$(TARGET_CFLAGS)" \
57 ./configure \
58 --target=$(GNU_TARGET_NAME) \
59 --host=$(GNU_TARGET_NAME) \
60 --build=$(GNU_HOST_NAME) \
61 --program-prefix="" \
62 --program-suffix="" \
63 --prefix=/usr \
64 --exec-prefix=/usr \
65 --bindir=/usr/sbin \
66 --datadir=/usr/share \
67 --includedir=/usr/include \
68 --infodir=/usr/share/info \
69 --libdir=/usr/lib \
70 --libexecdir=/usr/lib \
71 --localstatedir=/var \
72 --mandir=/usr/share/man \
73 --sbindir=/usr/sbin \
74 --sysconfdir=/etc \
75 --enable-largefile \
76 --disable-nls \
77 --without-ssl \
78 );
79 $(MAKE) -C $(WRKBUILD)
80 ( cd $(WRKBUILD); mv monit monit-nossl; )
81 $(MAKE) -C $(WRKBUILD) clean
82endif
83 touch $@
84
85$(IPKG_MONIT):
86 install -d -m0755 $(IDIR_MONIT)/etc
87 install -m0600 $(WRKBUILD)/monitrc $(IDIR_MONIT)/etc/
88 install -d -m0755 $(IDIR_MONIT)/etc/init.d
89 install -m0755 ./files/monit.init $(IDIR_MONIT)/etc/init.d/monit
90 install -d -m0755 $(IDIR_MONIT)/usr/sbin
91 install -m0755 $(WRKBUILD)/monit-ssl $(IDIR_MONIT)/usr/sbin/monit
92 $(RSTRIP) $(IDIR_MONIT)
93 $(IPKG_BUILD) $(IDIR_MONIT) $(PACKAGE_DIR)
94
95$(IPKG_MONIT_NOSSL):
96 install -d -m0755 $(IDIR_MONIT_NOSSL)/etc
97 install -m0600 $(WRKBUILD)/monitrc $(IDIR_MONIT_NOSSL)/etc/
98 install -d -m0755 $(IDIR_MONIT_NOSSL)/etc/init.d
99 install -m0755 ./files/monit.init $(IDIR_MONIT_NOSSL)/etc/init.d/monit
100 install -d -m0755 $(IDIR_MONIT_NOSSL)/usr/sbin
101 install -m0755 $(WRKBUILD)/monit-nossl $(IDIR_MONIT_NOSSL)/usr/sbin/monit
102 $(RSTRIP) $(IDIR_MONIT_NOSSL)
103 $(IPKG_BUILD) $(IDIR_MONIT_NOSSL) $(PACKAGE_DIR)
Note: See TracBrowser for help on using the repository browser.