| 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:= collectd
|
|---|
| 10 | PKG_VERSION:= 3.9.4
|
|---|
| 11 | PKG_RELEASE:= 2
|
|---|
| 12 | PKG_MD5SUM:= 1e5cab09394e0e5a1e5b3f8c923858a3
|
|---|
| 13 | PKG_INIT:= 75
|
|---|
| 14 |
|
|---|
| 15 | PKG_SOURCE_URL:= http://verplant.org/collectd/files
|
|---|
| 16 |
|
|---|
| 17 | include $(TOPDIR)/mk/package.mk
|
|---|
| 18 |
|
|---|
| 19 | $(eval $(call PKG_template,COLLECTD,collectd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 20 |
|
|---|
| 21 | ifneq ($(FWRT_PACKAGE_COLLECTD_CPU),y)
|
|---|
| 22 | DISABLE_CPU:=--disable-cpu
|
|---|
| 23 | endif
|
|---|
| 24 | ifneq ($(FWRT_PACKAGE_COLLECTD_LOAD),y)
|
|---|
| 25 | DISABLE_LOAD:=--disable-load
|
|---|
| 26 | endif
|
|---|
| 27 | ifneq ($(FWRT_PACKAGE_COLLECTD_MEMORY),y)
|
|---|
| 28 | DISABLE_MEMORY:=--disable-memory
|
|---|
| 29 | endif
|
|---|
| 30 | ifneq ($(FWRT_PACKAGE_COLLECTD_PING),y)
|
|---|
| 31 | DISABLE_PING:=--disable-ping
|
|---|
| 32 | endif
|
|---|
| 33 | ifneq ($(FWRT_PACKAGE_COLLECTD_TRAFFIC),y)
|
|---|
| 34 | DISABLE_TRAFFIC:=--disable-traffic
|
|---|
| 35 | endif
|
|---|
| 36 |
|
|---|
| 37 | $(WRKBUILD)/.configured: $(WRKBUILD)/.prepared
|
|---|
| 38 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 39 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 40 | CFLAGS="$(strip $(TARGET_CFLAGS))" \
|
|---|
| 41 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 42 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 43 | ./configure \
|
|---|
| 44 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 45 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 46 | --build=$(GNU_HOST_NAME) \
|
|---|
| 47 | --program-prefix="" \
|
|---|
| 48 | --program-suffix="" \
|
|---|
| 49 | --prefix=/usr \
|
|---|
| 50 | --exec-prefix=/usr \
|
|---|
| 51 | --bindir=/usr/bin \
|
|---|
| 52 | --datadir=/usr/share \
|
|---|
| 53 | --includedir=/usr/include \
|
|---|
| 54 | --infodir=/usr/share/info \
|
|---|
| 55 | --libdir=/usr/lib \
|
|---|
| 56 | --libexecdir=/usr/lib \
|
|---|
| 57 | --localstatedir=/var \
|
|---|
| 58 | --mandir=/usr/share/man \
|
|---|
| 59 | --sbindir=/usr/sbin \
|
|---|
| 60 | --sysconfdir=/etc \
|
|---|
| 61 | --enable-shared \
|
|---|
| 62 | --disable-static \
|
|---|
| 63 | --disable-debug \
|
|---|
| 64 | $(DISABLE_CPU) \
|
|---|
| 65 | $(DISABLE_LOAD) \
|
|---|
| 66 | $(DISABLE_MEMORY) \
|
|---|
| 67 | $(DISABLE_PING) \
|
|---|
| 68 | $(DISABLE_TRAFFIC) \
|
|---|
| 69 | --disable-cpufreq \
|
|---|
| 70 | --disable-disk \
|
|---|
| 71 | --disable-hddtemp \
|
|---|
| 72 | --disable-nfs \
|
|---|
| 73 | --disable-processes \
|
|---|
| 74 | --disable-sensors \
|
|---|
| 75 | --disable-serial \
|
|---|
| 76 | --disable-swap \
|
|---|
| 77 | --disable-tape \
|
|---|
| 78 | --disable-users \
|
|---|
| 79 | --disable-apache \
|
|---|
| 80 | );
|
|---|
| 81 | touch $@
|
|---|
| 82 |
|
|---|
| 83 | $(WRKBUILD)/.built: $(WRKBUILD)/.configured
|
|---|
| 84 | $(MAKE) -C $(WRKBUILD)
|
|---|
| 85 | mkdir -p $(WRKINST)
|
|---|
| 86 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 87 | DESTDIR="$(WRKINST)" \
|
|---|
| 88 | install
|
|---|
| 89 | touch $@
|
|---|
| 90 |
|
|---|
| 91 | $(IPKG_COLLECTD):
|
|---|
| 92 | install -d -m0755 $(IDIR_COLLECTD)/etc/init.d
|
|---|
| 93 | install -d -m0755 $(IDIR_COLLECTD)/usr/sbin
|
|---|
| 94 | install -d -m0755 $(IDIR_COLLECTD)/usr/lib/collectd
|
|---|
| 95 | install -d -m0755 $(IDIR_COLLECTD)/var/lib/collectd
|
|---|
| 96 | install -d -m0755 $(IDIR_COLLECTD)/var/run
|
|---|
| 97 | $(INSTALL_BIN) ./files/collectd.init \
|
|---|
| 98 | $(IDIR_COLLECTD)/etc/init.d/S$(PKG_INIT)collectd
|
|---|
| 99 | $(CP) $(WRKINST)/usr/sbin/collectd $(IDIR_COLLECTD)/usr/sbin/
|
|---|
| 100 | $(CP) $(WRKINST)/usr/lib/collectd/*.so $(IDIR_COLLECTD)/usr/lib/collectd/
|
|---|
| 101 | $(RSTRIP) $(IDIR_COLLECTD)
|
|---|
| 102 | $(IPKG_BUILD) $(IDIR_COLLECTD) $(PACKAGE_DIR)
|
|---|