fix various compile issues
[openwrt/svn-archive/archive.git] / net / arpd / 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:=arpd
12 PKG_VERSION:=0.2
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=e2911fa9de1b92ef50deda1489ae944d
15
16 PKG_SOURCE_URL:=http://niels.xtdnet.nl/honeyd
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/arpd
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libpcap +libdnet +libevent
29 TITLE:=A daemon to fake ARP replies
30 DESCRIPTION:=A daemon to fake ARP replies
31 URL:=http://niels.xtdnet.nl/honeyd
32 endef
33
34 define Build/Configure
35 $(call Build/Configure/Default,--enable-shared --disable-static \
36 --with-libdnet=$(STAGING_DIR)/usr \
37 --with-libevent=$(STAGING_DIR)/usr \
38 --with-libpcap=$(STAGING_DIR)/usr \
39 )
40 endef
41
42 define Build/Compile
43 rm -rf $(PKG_INSTALL_DIR)
44 mkdir -p $(PKG_INSTALL_DIR)
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 CCOPT="$(TARGET_CFLAGS)" \
47 INCLS="-I. -I$(STAGING_DIR)/usr/include" \
48 LIBS="-L$(STAGING_DIR)/usr/lib -lpcap -ldnet -levent"
49 endef
50
51 define Package/arpd/install
52 install -d -m0755 $(1)/usr/sbin
53 $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
54 endef
55
56 $(eval $(call BuildPackage,arpd))