fix the xt/ipt module path issue
[openwrt.git] / openwrt / package / collectd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=collectd
6 PKG_VERSION:=3.5.1
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=46a4b81e46d3bb58faab1d603649d737
9
10 PKG_SOURCE_URL:=http://verplant.org/collectd/files
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,COLLECTD,collectd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 ifneq ($(BR2_PACKAGE_COLLECTD_CPU),y)
22 DISABLE_CPU:=--disable-cpu
23 endif
24 ifneq ($(BR2_PACKAGE_COLLECTD_LOAD),y)
25 DISABLE_LOAD:=--disable-load
26 endif
27 ifneq ($(BR2_PACKAGE_COLLECTD_MEMORY),y)
28 DISABLE_MEMORY:=--disable-memory
29 endif
30 ifneq ($(BR2_PACKAGE_COLLECTD_PING),y)
31 DISABLE_PING:=--disable-ping
32 endif
33 ifneq ($(BR2_PACKAGE_COLLECTD_TRAFFIC),y)
34 DISABLE_TRAFFIC:=--disable-traffic
35 endif
36
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" \
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 );
80 touch $(PKG_BUILD_DIR)/.configured
81
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)" \
87 install
88 touch $(PKG_BUILD_DIR)/.built
89
90 $(IPKG_COLLECTD):
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) ./files/S80collectd $(IDIR_COLLECTD)/etc/init.d/
97 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(IDIR_COLLECTD)/usr/sbin/
98 $(CP) $(PKG_INSTALL_DIR)/usr/lib/collectd/*.so $(IDIR_COLLECTD)/usr/lib/collectd/
99 $(RSTRIP) $(IDIR_COLLECTD)
100 $(IPKG_BUILD) $(IDIR_COLLECTD) $(PACKAGE_DIR)
101
This page took 0.043823 seconds and 5 git commands to generate.