ndppd: initial import (release 0.2.1)
[packages.git] / ipv6 / ndppd / Makefile
1
2 # Copyright (C) 2007-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ndppd
11 PKG_VERSION:=0.2.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.priv.nu/projects/ndppd/files/
16 PKG_MD5SUM:=9b65a8cccfce8689f0c1c410c20b4790
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/ndppd
21   SECTION:=ipv6
22   CATEGORY:=IPv6
23   TITLE:=NDP Proxy Daemon
24   URL:=http://www.priv.nu/projects/ndppd/
25   MAINTAINER:=Gabriel Kerneis <kerneis@pps.jussieu.fr>
26   DEPENDS:=+kmod-ipv6 +confuse +uclibcxx
27 endef
28
29 define Package/ndppd/description
30  ndppd, or NDP Proxy Daemon, is a daemon that proxies NDP (Neighbor Discovery
31  Protocol) messages between interfaces.  ndppd currently only supports Neighbor
32  Solicitation Messages and Neighbor Advertisement Messages.
33
34  The ndp_proxy provided by Linux doesn't support listing proxies, and only hosts
35  are supported.  No subnets.  ndppd solves this by listening for Neighbor
36  Solicitation messages on an interface, then query the internal interfaces for
37  that target IP before finally sending a Neighbor Advertisement message.
38 endef
39
40 define Package/ndppd/conffiles
41 /etc/ndppd.conf
42 endef
43
44 define Build/Compile
45         $(MAKE) -C $(PKG_BUILD_DIR) \
46                 CXX="$(TARGET_CXX)" \
47                 CXXFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS) -fno-builtin -fno-rtti -nostdinc++ \
48                         -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
49                 LDFLAGS="$(TARGET_LDFLAGS)" \
50                 LIBS="-nodefaultlibs -luClibc++ -lconfuse" \
51                 ndppd
52 endef
53
54 define Package/ndppd/install
55         $(INSTALL_DIR) $(1)/usr/sbin
56         $(INSTALL_BIN) $(PKG_BUILD_DIR)/ndppd $(1)/usr/sbin/
57         $(INSTALL_DIR) $(1)/etc/init.d
58         $(INSTALL_BIN) ./files/ndppd.init $(1)/etc/init.d/ndppd
59         $(INSTALL_CONF) $(PKG_BUILD_DIR)/ndppd.conf-dist $(1)/etc/ndppd.conf
60 endef
61
62 $(eval $(call BuildPackage,ndppd))