update mpd to v0.14.2, patch by Jan Willies
[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
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/rrdcollect/Default
22 SECTION:=utils
23 CATEGORY:=Utilities
24 URL:=http://rrdcollect.sourceforge.net/
25 endef
26
27 define Package/rrdcollect
28 $(call Package/rrdcollect/Default)
29 DEPENDS:=+librrd
30 TITLE:=Round-Robin Database (RRD) collecting daemon
31 MENU:=1
32 endef
33
34 define Package/rrdcollect/description
35 =
36 RRDcollect is a daemon which polls ceratin files in /proc/
37 directory, gathering data and storing it inside RRDtool's
38 database files. Being written in C should be both fast
39 and resources-friendly. Supports both scanf(3)-style
40 pattern matches and perl compatible regular expressions.
41 This package contains the RRD collecting daemon.
42 endef
43
44 define Package/rrdcollect-example
45 $(call Package/rrdcollect/Default)
46 DEPENDS:=rrdcollect
47 TITLE:=Example setup for RRD collecting daemon above
48 endef
49
50 define Package/rrdcollect-example/description
51 =
52 RRDcollect is a daemon which polls ceratin files in /proc/
53 directory, gathering data and storing it inside RRDtool's
54 database files. Being written in C should be both fast
55 and resources-friendly. Supports both scanf(3)-style
56 pattern matches and perl compatible regular expressions.
57 This package contains examples for the RRD collecting daemon.
58 endef
59
60 define Package/rrdcollect-example/conffiles
61 /etc/rrd.conf
62 /etc/rrdcollect.conf
63 endef
64
65 define Build/Configure
66 $(call Build/Configure/Default, \
67 --enable-shared \
68 --disable-static \
69 --disable-rpath \
70 --enable-exec \
71 --without-rrdtool \
72 --with-librrd \
73 --without-libpcre \
74 --without-libpcap \
75 , \
76 CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
77 LIBS="-lz -lfreetype -lpng -lart_lgpl_2" \
78 )
79 endef
80
81 define Build/Compile
82 $(MAKE) -C $(PKG_BUILD_DIR) \
83 DESTDIR="$(PKG_INSTALL_DIR)" \
84 all install
85 endef
86
87 define Package/rrdcollect/install
88 $(INSTALL_DIR) $(1)/usr/sbin
89 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(1)/usr/sbin/
90 endef
91
92 define Package/rrdcollect-example/install
93 $(INSTALL_DIR) $(1)/etc
94 $(INSTALL_DATA) ./files/rrd.conf $(1)/etc/
95 $(INSTALL_DATA) ./files/rrdcollect.conf $(1)/etc/
96 $(INSTALL_DIR) $(1)/etc/init.d
97 $(INSTALL_BIN) ./files/rrdcollect.init $(1)/etc/init.d/rrdcollect
98 $(INSTALL_DIR) $(1)/usr/bin
99 $(INSTALL_BIN) ./files/rrd.sh $(1)/usr/bin/
100 $(INSTALL_DIR) $(1)/www/cgi-bin
101 ln -sf /var/lib/rrdcollect/rrd.cgi $(1)/www/cgi-bin/rrd.cgi
102 ln -sf /var/lib/rrdcollect/img $(1)/www/img
103 endef
104
105 $(eval $(call BuildPackage,rrdcollect))
106 $(eval $(call BuildPackage,rrdcollect-example))