Add vnstati (#4311)
[openwrt/svn-archive/archive.git] / net / ipcad / Makefile
1 #
2 # Copyright (C) 2006-2008 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:=ipcad
12 PKG_VERSION:=3.7.3
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/ipcad
17 PKG_MD5SUM:=125605249958894148ec26d3c88189f5
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/ipcad
22 SECTION:=net
23 CATEGORY:=Network
24 DEPENDS:=+libpcap
25 TITLE:=listens for traffic on the specified interfaces
26 URL:=http://lionet.info/ipcad/
27 endef
28
29 define Package/ipcad/description
30 This daemon listens for traffic on the specified interfaces.
31 It has the built-in RSH and NetFlow engines to allow exporting
32 the accounting data the same way as Cisco routers do.
33 endef
34
35 define Package/ipcad/conffiles/
36 /etc/ipcad.conf
37 endef
38
39 # XXX: don't detect/use netfilter ipq capture
40 define Build/Configure
41 (cd $(PKG_BUILD_DIR); touch \
42 cfglex.c \
43 cslex.c \
44 );
45 $(call Build/Configure/Default, \
46 --enable-shared \
47 --disable-static \
48 --with-psrc=pcap \
49 --with-pcap-include="$(STAGING_DIR)/usr/include" \
50 --with-pcap-libraries="$(STAGING_DIR)/usr/lib" \
51 , \
52 ac_cv_func_getifaddrs=no \
53 ac_cv_header_ifaddrs_h=no \
54 ac_cv_header_linux_netfilter_ipv4_ip_queue_h=no \
55 )
56 endef
57
58 define Build/Compile
59 $(MAKE) -C $(PKG_BUILD_DIR) \
60 DESTDIR="$(PKG_INSTALL_DIR)" \
61 all install
62 endef
63
64 define Package/ipcad/install
65 $(INSTALL_DIR) $(1)/etc
66 $(CP) $(PKG_INSTALL_DIR)/etc/ipcad.conf $(1)/etc/
67 $(INSTALL_DIR) $(1)/usr/bin
68 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ipcad $(1)/usr/bin/
69 endef
70
71 $(eval $(call BuildPackage,ipcad))