Port ipcad to -ng
[openwrt/svn-archive/archive.git] / net / ipcad / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ipcad
11 PKG_VERSION:=3.7
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=34c542c99593dfe9d5b408deffcfe70e
14
15 PKG_SOURCE_URL:=@SF/ipcad
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_CAT:=zcat
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 DESCRIPTION:=This daemon listens for traffic on the specified interfaces.\\\
30 It has the built-in RSH and NetFlow engines to allow exporting\\\
31 the accounting data the same way as Cisco routers do.\\\
32 URL:=http://lionet.info/ipcad/
33 endef
34
35 define Package/ipcad/conffiles/
36 /etc/ipcad.conf
37 endef
38
39
40 define Build/Configure
41 $(call Build/Configure/Default,--enable-shared \
42 --disable-static \
43 --disable-rpath \
44 --with-gnu-ld \
45 --with-psrc=pcap \
46 --with-pcap-include="$(STAGING_DIR)/usr/include" \
47 --with-pcap-libraries="$(STAGING_DIR)/usr/lib",touch cfglex.c cslex.c;)
48 endef
49
50 define Build/Compile
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 DESTDIR=$(PKG_INSTALL_DIR) \
53 all install
54 endef
55
56 define Package/ipcad/install
57 install -d -m0755 $(1)/etc
58 $(CP) $(PKG_INSTALL_DIR)/etc/ipcad.conf $(1)/etc/
59 install -d -m0755 $(1)/usr/bin
60 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ipcad $(1)/usr/bin/
61 endef
62
63 $(eval $(call BuildPackage,ipcad))