massive Makefile cleanup, add missing 'svn:keywords' property
[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 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/ipcad
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libpcap
29 TITLE:=listens for traffic on the specified interfaces
30 DESCRIPTION:=\
31 This daemon listens for traffic on the specified interfaces.\\\
32 It has the built-in RSH and NetFlow engines to allow exporting \\\
33 the accounting data the same way as Cisco routers do.
34 URL:=http://lionet.info/ipcad/
35 endef
36
37 define Package/ipcad/conffiles/
38 /etc/ipcad.conf
39 endef
40
41 define Build/Configure
42 (cd $(PKG_BUILD_DIR); touch \
43 cfglex.c \
44 cslex.c \
45 );
46 $(call Build/Configure/Default, \
47 --enable-shared \
48 --disable-static \
49 --with-psrc=pcap \
50 --with-pcap-include="$(STAGING_DIR)/usr/include" \
51 --with-pcap-libraries="$(STAGING_DIR)/usr/lib" \
52 , \
53 ac_cv_func_getifaddrs=no \
54 ac_cv_header_ifaddrs_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 -d -m0755 $(1)/etc
66 $(CP) $(PKG_INSTALL_DIR)/etc/ipcad.conf $(1)/etc/
67 install -d -m0755 $(1)/usr/bin
68 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ipcad $(1)/usr/bin/
69 endef
70
71 $(eval $(call BuildPackage,ipcad))