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