add packages_10.03.2 in preparation for the 10.03.2 interim release
[10.03/packages.git] / utils / rrdcollect / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=rrdcollect
11 PKG_VERSION:=0.2.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/rrdcollect
16 PKG_MD5SUM:=fd7ac95195e3e5cbab0677629505d9be
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/rrdcollect/Default
23   SECTION:=utils
24   CATEGORY:=Utilities
25   URL:=http://rrdcollect.sourceforge.net/
26 endef
27
28 define Package/rrdcollect/Default/description
29  RRDcollect is a daemon which polls ceratin files in /proc/ 
30  directory, gathering data and storing it inside RRDtool's 
31  database files. Being written in C should be both fast 
32  and resources-friendly. Supports both scanf(3)-style 
33  pattern matches and perl compatible regular expressions.       
34 endef
35
36 define Package/rrdcollect
37 $(call Package/rrdcollect/Default)
38   DEPENDS:=+librrd1
39   TITLE:=Round-Robin Database (RRD) collecting daemon
40   MENU:=1
41 endef
42
43 define Package/rrdcollect/description
44 $(call Package/rrdcollect/Default/description)
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 $(call Package/rrdcollect/Default/description)
56  This package contains examples for the RRD collecting daemon.
57 endef
58
59 define Package/rrdcollect-example/conffiles
60 /etc/rrd.conf
61 /etc/rrdcollect.conf
62 endef
63
64 CONFIGURE_ARGS+= \
65         --enable-shared \
66         --disable-static \
67         --disable-rpath \
68         --enable-exec \
69         --without-rrdtool \
70         --with-librrd="$(STAGING_DIR)/usr/lib/rrdtool-1.0" \
71         --without-libpcre \
72         --without-libpcap \
73
74 CONFIGURE_VARS+= \
75         CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
76
77 define Package/rrdcollect/install
78         $(INSTALL_DIR) $(1)/usr/sbin
79         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(1)/usr/sbin/
80 endef
81
82 define Package/rrdcollect-example/install
83         $(INSTALL_DIR) $(1)/etc
84         $(INSTALL_DATA) ./files/rrd.conf $(1)/etc/
85         $(INSTALL_DATA) ./files/rrdcollect.conf $(1)/etc/
86         $(INSTALL_DIR) $(1)/etc/init.d
87         $(INSTALL_BIN) ./files/rrdcollect.init $(1)/etc/init.d/rrdcollect
88         $(INSTALL_DIR) $(1)/usr/bin
89         $(INSTALL_BIN) ./files/rrd.sh $(1)/usr/bin/
90         $(INSTALL_DIR) $(1)/www/cgi-bin
91         ln -sf /var/lib/rrdcollect/rrd.cgi $(1)/www/cgi-bin/rrd.cgi
92         ln -sf /var/lib/rrdcollect/img $(1)/www/img
93 endef
94
95 $(eval $(call BuildPackage,rrdcollect))
96 $(eval $(call BuildPackage,rrdcollect-example))