summaryrefslogtreecommitdiff
path: root/package/collectd/Makefile
blob: d37bb30ea9f6f7ffc61f920ffb8e1bfaf00059f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include ${TOPDIR}/rules.mk

PKG_NAME:=		collectd
PKG_VERSION:=		5.4.0
PKG_RELEASE:=		1
PKG_MD5SUM:=		d4176b3066f3b85d85343d3648ea43f6
PKG_DESCR:=		System statistics collection daemon
PKG_SECTION:=		misc
PKG_BUILDDEP:=		libtool
PKG_DEPENDS:=		libpthread libltdl
PKG_URL:=		http://collectd.org/
PKG_SITES:=		http://collectd.org/files/

PKG_FLAVOURS_COLLECTD:=	WITH_CPU WITH_LOAD WITH_MEMORY WITH_PING
PKG_FLAVOURS_COLLECTD+=	WITH_RRD
PKGFD_WITH_RRD:=	enable RRD output
PKGFB_WITH_RRD:=	rrdtool
PKGFS_WITH_RRD:=	librrd
PKGFD_WITH_CPU:=	collect CPU statistics
PKGFD_WITH_LOAD:=	collect system load statistics
PKGFD_WITH_MEMORY:=	collect memory usage statistics
PKGFD_WITH_PING:=	enable ping statistic plugin

include ${TOPDIR}/mk/package.mk

$(eval $(call PKG_template,COLLECTD,collectd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

ifneq (${ADK_PACKAGE_COLLECTD_WITH_CPU},y)
DISABLE_CPU:=--disable-cpu
endif
ifneq (${ADK_PACKAGE_COLLECTD_WITH_LOAD},y)
DISABLE_LOAD:=--disable-load
endif
ifneq (${ADK_PACKAGE_COLLECTD_WITH_MEMORY},y)
DISABLE_MEMORY:=--disable-memory
endif
ifneq (${ADK_PACKAGE_COLLECTD_WITH_PING},y)
DISABLE_PING:=--disable-ping
endif

CONFIGURE_ARGS+=	--disable-aggregation \
			--disable-apache \
			--disable-apcups \
			--disable-apple_sensors \
			--disable-ascent \
			--disable-battery \
			--disable-cgroups \
			--disable-conntrack \
			${DISABLE_CPU} \
			--disable-cpufreq \
			--disable-contextswitch \
			--disable-disk \
			--enable-csv \
			--disable-df \
			--disable-dns \
			--disable-email \
			--disable-entropy \
			--disable-ethstat \
			--disable-exec \
			--disable-filecount \
			--disable-fscache \
			--disable-hddtemp \
			--disable-interface \
			--disable-iptables \
			--disable-ipvs \
			--disable-irq \
			${DISABLE_LOAD} \
			--disable-madwifi \
			--disable-mbmon \
			--disable-md \
			--disable-memcached \
			${DISABLE_MEMORY} \
			--disable-multimeter \
			--disable-mysql \
			--disable-network \
			--disable-nginx \
			--disable-nfs \
			--disable-ntpd \
			--disable-numa \
			--disable-nut \
			--disable-olsrd \
			--disable-openvpn \
			--disable-python \
			--disable-postgresql \
			--disable-powerdns \
			--disable-perl \
			${DISABLE_PING} \
			--disable-processes \
			--disable-protocols \
			--disable-sensors \
			--disable-serial \
			--disable-logfile \
			--disable-statsd \
			--disable-swap \
			--enable-syslog \
			--disable-tape \
			--disable-target_notification \
			--disable-target_replace \
			--disable-target_set \
			--disable-tcpconns \
			--disable-teamspeak2 \
			--disable-ted \
			--disable-thermal \
			--disable-unixsock \
			--disable-users \
			--disable-uptime \
			--disable-uuid \
			--disable-vserver \
			--disable-wireless \
			--disable-write_graphite \
			--disable-write_http \
			--with-fp-layout=nothing \
			--without-java \
			--without-python \
			--without-libiptc \
			--with-nan-emulation

TARGET_CFLAGS:=         $(filter-out -flto,$(TARGET_CFLAGS))
XAKE_FLAGS+=		LIBS='-lm -lltdl'

collectd-install:
	${INSTALL_DIR} ${IDIR_COLLECTD}/usr/lib/collectd \
		${IDIR_COLLECTD}/usr/sbin ${IDIR_COLLECTD}/etc
	${INSTALL_DIR} ${IDIR_COLLECTD}/usr/share/collectd
	${CP} ${WRKINST}/usr/share/collectd/types.db \
		${IDIR_COLLECTD}/usr/share/collectd
	${INSTALL_BIN} ${WRKINST}/usr/sbin/collectd ${IDIR_COLLECTD}/usr/sbin
	${CP} ${WRKINST}/usr/lib/collectd/*.so \
		${IDIR_COLLECTD}/usr/lib/collectd
	${INSTALL_DATA} ./files/collectd.conf \
		${IDIR_COLLECTD}/etc

include ${TOPDIR}/mk/pkg-bottom.mk