47c5a6bd2cfff6e6b99941cf3ea8d0b834be1224
[openwrt/svn-archive/archive.git] / utils / collectd / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=collectd
11 PKG_VERSION:=3.5.1
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=46a4b81e46d3bb58faab1d603649d737
14
15 PKG_SOURCE_URL:=http://verplant.org/collectd/files
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_CAT:=zcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/collectd
25 SECTION:=utils
26 CATEGORY:=Utilities
27 TITLE:=Lightweight system statistics collection daemon
28 DESCRIPTION:=Lightweight system statistics collection daemon
29 URL:=http://verplant.org/collectd/
30 endef
31
32 define Build/Compile
33 $(call Build/Configure/Default,--enable-shared \
34 --disable-static \
35 --disable-debug \
36 --enable-cpu \
37 --enable-load \
38 --enable-memory \
39 --enable-ping \
40 --enable-traffic \
41 --disable-cpufreq \
42 --disable-disk \
43 --disable-hddtemp \
44 --disable-nfs \
45 --disable-processes \
46 --disable-sensors \
47 --disable-serial \
48 --disable-swap \
49 --disable-tape \
50 --disable-users \
51 )
52 endef
53
54 define Build/Compile
55 $(MAKE) -C $(PKG_BUILD_DIR)
56 mkdir -p $(PKG_INSTALL_DIR)
57 $(MAKE) -C $(PKG_BUILD_DIR) \
58 DESTDIR="$(PKG_INSTALL_DIR)" \
59 install
60 endef
61
62 define Package/collectd/install
63 install -d -m0755 $(1)/etc/init.d
64 install -d -m0755 $(1)/usr/sbin
65 install -d -m0755 $(1)/usr/lib/collectd
66 install -d -m0755 $(1)/var/lib/collectd
67 install -d -m0755 $(1)/var/run
68 install -m0755 ./files/S80collectd $(1)/etc/init.d/
69 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/collectd/*.so $(1)/usr/lib/collectd/
71 endef
72
73 $(eval $(call BuildPackage,collectd))