3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=46a4b81e46d3bb58faab1d603649d737
10 PKG_SOURCE_URL
:=http
://verplant.org
/collectd
/files
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 include $(TOPDIR
)/package
/rules.mk
19 $(eval
$(call PKG_template
,COLLECTD
,collectd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
21 ifneq ($(BR2_PACKAGE_COLLECTD_CPU
),y
)
22 DISABLE_CPU
:=--disable-cpu
24 ifneq ($(BR2_PACKAGE_COLLECTD_LOAD
),y
)
25 DISABLE_LOAD
:=--disable-load
27 ifneq ($(BR2_PACKAGE_COLLECTD_MEMORY
),y
)
28 DISABLE_MEMORY
:=--disable-memory
30 ifneq ($(BR2_PACKAGE_COLLECTD_PING
),y
)
31 DISABLE_PING
:=--disable-ping
33 ifneq ($(BR2_PACKAGE_COLLECTD_TRAFFIC
),y
)
34 DISABLE_TRAFFIC
:=--disable-traffic
37 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
38 (cd
$(PKG_BUILD_DIR
); 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" \
44 --target
=$(GNU_TARGET_NAME
) \
45 --host
=$(GNU_TARGET_NAME
) \
46 --build
=$(GNU_HOST_NAME
) \
52 --datadir=/usr
/share \
53 --includedir=/usr
/include \
54 --infodir=/usr
/share
/info \
56 --libexecdir
=/usr
/lib \
57 --localstatedir
=/var \
58 --mandir=/usr
/share
/man \
80 touch
$(PKG_BUILD_DIR
)/.configured
82 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
83 $(MAKE
) -C
$(PKG_BUILD_DIR
)
84 mkdir
-p
$(PKG_INSTALL_DIR
)
85 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
86 DESTDIR
="$(PKG_INSTALL_DIR)" \
88 touch
$(PKG_BUILD_DIR
)/.built
91 install -d
-m0755
$(IDIR_COLLECTD
)/etc
/init.d
92 install -d
-m0755
$(IDIR_COLLECTD
)/usr
/sbin
93 install -d
-m0755
$(IDIR_COLLECTD
)/usr
/lib
/collectd
94 install -d
-m0755
$(IDIR_COLLECTD
)/var
/lib
/collectd
95 install -d
-m0755
$(IDIR_COLLECTD
)/var
/run
96 cp
-fpR .
/files
/S80collectd
$(IDIR_COLLECTD
)/etc
/init.d
/
97 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/collectd
$(IDIR_COLLECTD
)/usr
/sbin
/
98 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/collectd
/*.so
$(IDIR_COLLECTD
)/usr
/lib
/collectd
/
99 $(RSTRIP
) $(IDIR_COLLECTD
)
100 $(IPKG_BUILD
) $(IDIR_COLLECTD
) $(PACKAGE_DIR
)