8ffcacb69c9de7c937e0e67d751a286996a4608e
[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.2
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
16 # Latest release
17 PKG_SOURCE_URL:=http://www.priv.nu/projects/ndppd/files/
18 PKG_MD5SUM:=d90c4b65777a62274c1837dba341e5a8
19
20 # Development snapshot
21 #PKG_SOURCE_URL=git://github.com/Tuhox/ndppd.git
22 #PKG_SOURCE_VERSION=master
23 #PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION)
24
25 include $(INCLUDE_DIR)/uclibc++.mk
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/ndppd
29   SECTION:=ipv6
30   CATEGORY:=IPv6
31   TITLE:=NDP Proxy Daemon
32   URL:=http://www.priv.nu/projects/ndppd/
33   MAINTAINER:=Gabriel Kerneis <kerneis@pps.jussieu.fr>
34   DEPENDS:=+kmod-ipv6 $(CXX_DEPENDS)
35 endef
36
37 define Package/ndppd/description
38  ndppd, or NDP Proxy Daemon, is a daemon that proxies NDP (Neighbor Discovery
39  Protocol) messages between interfaces.  ndppd currently only supports Neighbor
40  Solicitation Messages and Neighbor Advertisement Messages.
41
42  The ndp_proxy provided by Linux doesn't support listing proxies, and only hosts
43  are supported.  No subnets.  ndppd solves this by listening for Neighbor
44  Solicitation messages on an interface, then query the internal interfaces for
45  that target IP before finally sending a Neighbor Advertisement message.
46 endef
47
48 define Package/ndppd/conffiles
49 /etc/ndppd.conf
50 endef
51
52 define Build/Compile
53         $(MAKE) -C $(PKG_BUILD_DIR) \
54                 CXX="$(TARGET_CXX)" \
55                 CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++0x -fno-rtti" \
56                 LDFLAGS="$(TARGET_LDFLAGS)" \
57                 LIBS="-lc" \
58                 ndppd
59 endef
60
61 define Package/ndppd/install
62         $(INSTALL_DIR) $(1)/usr/sbin
63         $(INSTALL_BIN) $(PKG_BUILD_DIR)/ndppd $(1)/usr/sbin/
64         $(INSTALL_DIR) $(1)/etc/init.d
65         $(INSTALL_BIN) ./files/ndppd.init $(1)/etc/init.d/ndppd
66         $(INSTALL_CONF) $(PKG_BUILD_DIR)/ndppd.conf-dist $(1)/etc/ndppd.conf
67 endef
68
69 $(eval $(call BuildPackage,ndppd))