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