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-02-24
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:=24c344b621b0d8d81be2aaac806d905dbe6bbca6
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
26 ifneq ($(CONFIG_PACKAGE_odhcpd_ext_prefix_class),0)
27 CMAKE_OPTIONS += -DEXT_PREFIX_CLASS=$(CONFIG_PACKAGE_odhcpd_ext_prefix_class)
33 TITLE:=OpenWrt DHCP/DHCPv6(-PD)/RA Server & Relay
34 DEPENDS:=+libubox +libuci +libubus
37 define Package/odhcpd/config
38 config PACKAGE_odhcpd_ext_prefix_class
39 int "Prefix Class Extension ID (0 = disabled)"
40 depends on PACKAGE_odhcpd
44 define Package/odhcpd/description
45 odhcpd is a daemon for serving and relaying IP management protocols to
46 configure clients and downstream routers. It tries to follow the RFC 6204
47 requirements for IPv6 home routers.
49 odhcpd provides server services for DHCP, RA, stateless and stateful DHCPv6,
50 prefix delegation and can be used to relay RA, DHCPv6 and NDP between routed
51 (non-bridged) interfaces in case no delegated prefixes are available.
54 define Package/odhcpd/install
55 $(INSTALL_DIR) $(1)/usr/sbin/
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcpd $(1)/usr/sbin/
57 $(INSTALL_BIN) ./files/odhcpd-update $(1)/usr/sbin/
58 $(INSTALL_DIR) $(1)/etc/init.d
59 $(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd
60 $(INSTALL_DIR) $(1)/etc/uci-defaults
61 $(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults
64 $(eval $(call BuildPackage,odhcpd))