2 # Copyright (C) 2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
11 PKG_VERSION:=2014-05-26
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE_URL:=git://github.com/sbyx/odhcpd.git
18 PKG_SOURCE_VERSION:=87b974a21add279ce7f7be31f7b22f7ea97949c3
20 PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/cmake.mk
25 CMAKE_OPTIONS += -DUBUS=1
27 ifneq ($(CONFIG_PACKAGE_odhcpd_ext_prefix_class),0)
28 CMAKE_OPTIONS += -DEXT_PREFIX_CLASS=$(CONFIG_PACKAGE_odhcpd_ext_prefix_class)
31 ifneq ($(CONFIG_PACKAGE_odhcpd_ext_cer_id),0)
32 CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcpd_ext_cer_id)
39 TITLE:=OpenWrt DHCP/DHCPv6(-PD)/RA Server & Relay
40 DEPENDS:=+libubox +libuci +libubus
43 define Package/odhcpd/config
44 config PACKAGE_odhcpd_ext_prefix_class
45 int "Prefix Class Extension ID (0 = disabled)"
46 depends on PACKAGE_odhcpd
48 config PACKAGE_odhcpd_ext_cer_id
49 int "CER-ID Extension ID (0 = disabled)"
50 depends on PACKAGE_odhcpd
54 define Package/odhcpd/description
55 odhcpd is a daemon for serving and relaying IP management protocols to
56 configure clients and downstream routers. It tries to follow the RFC 6204
57 requirements for IPv6 home routers.
59 odhcpd provides server services for DHCP, RA, stateless and stateful DHCPv6,
60 prefix delegation and can be used to relay RA, DHCPv6 and NDP between routed
61 (non-bridged) interfaces in case no delegated prefixes are available.
64 define Package/odhcpd/install
65 $(INSTALL_DIR) $(1)/usr/sbin/
66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcpd $(1)/usr/sbin/
67 $(INSTALL_BIN) ./files/odhcpd-update $(1)/usr/sbin/
68 $(INSTALL_DIR) $(1)/etc/init.d
69 $(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd
70 $(INSTALL_DIR) $(1)/etc/uci-defaults
71 $(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults
74 $(eval $(call BuildPackage,odhcpd))