DESCRIPTION:= is obselete
[openwrt/svn-archive/archive.git] / utils / rrdcollect / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=rrdcollect
12 PKG_VERSION:=0.2.3
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/rrdcollect
17 PKG_MD5SUM:=5e4305c612bc3cccbaf802c275c81a11
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/rrdcollect/Default
26 SECTION:=utils
27 CATEGORY:=Utilities
28 URL:=http://rrdcollect.sourceforge.net/
29 endef
30
31 define Package/rrdcollect
32 $(call Package/rrdcollect/Default)
33 DEPENDS:=+librrd
34 TITLE:=Round-Robin Database (RRD) collecting daemon
35 MENU:=1
36 endef
37
38 define Package/rrdcollect/description
39 =
40 RRDcollect is a daemon which polls ceratin files in /proc/
41 directory, gathering data and storing it inside RRDtool's
42 database files. Being written in C should be both fast
43 and resources-friendly. Supports both scanf(3)-style
44 pattern matches and perl compatible regular expressions.
45 This package contains the RRD collecting daemon.
46 endef
47
48 define Package/rrdcollect-example
49 $(call Package/rrdcollect/Default)
50 DEPENDS:=rrdcollect
51 TITLE:=Example setup for RRD collecting daemon above
52 endef
53
54 define Package/rrdcollect-example/description
55 =
56 RRDcollect is a daemon which polls ceratin files in /proc/
57 directory, gathering data and storing it inside RRDtool's
58 database files. Being written in C should be both fast
59 and resources-friendly. Supports both scanf(3)-style
60 pattern matches and perl compatible regular expressions.
61 This package contains examples for the RRD collecting daemon.
62 endef
63
64 define Package/rrdcollect-example/conffiles
65 /etc/rrd.conf
66 /etc/rrdcollect.conf
67 endef
68
69 define Build/Configure
70 $(call Build/Configure/Default, \
71 --enable-shared \
72 --disable-static \
73 --disable-rpath \
74 --enable-exec \
75 --without-rrdtool \
76 --with-librrd \
77 --without-libpcre \
78 --without-libpcap \
79 , \
80 CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
81 LIBS="-lz -lfreetype -lpng -lart_lgpl_2" \
82 )
83 endef
84
85 define Build/Compile
86 $(MAKE) -C $(PKG_BUILD_DIR) \
87 DESTDIR="$(PKG_INSTALL_DIR)" \
88 all install
89 endef
90
91 define Package/rrdcollect/install
92 $(INSTALL_DIR) $(1)/usr/sbin
93 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(1)/usr/sbin/
94 endef
95
96 define Package/rrdcollect-example/install
97 $(INSTALL_DIR) $(1)/etc
98 $(INSTALL_DATA) ./files/rrd.conf $(1)/etc/
99 $(INSTALL_DATA) ./files/rrdcollect.conf $(1)/etc/
100 $(INSTALL_DIR) $(1)/etc/init.d
101 $(INSTALL_BIN) ./files/rrdcollect.init $(1)/etc/init.d/rrdcollect
102 $(INSTALL_DIR) $(1)/usr/bin
103 $(INSTALL_BIN) ./files/rrd.sh $(1)/usr/bin/
104 $(INSTALL_DIR) $(1)/www/cgi-bin
105 ln -sf /var/lib/rrdcollect/rrd.cgi $(1)/www/cgi-bin/rrd.cgi
106 ln -sf /var/lib/rrdcollect/img $(1)/www/img
107 endef
108
109 $(eval $(call BuildPackage,rrdcollect))
110 $(eval $(call BuildPackage,rrdcollect-example))