2 # Copyright (C) 2013-2015 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
14 PKG_SOURCE_URL
=$(LEDE_GIT
)/project
/odhcpd.git
15 PKG_SOURCE_DATE
:=2017-11-21
16 PKG_SOURCE_VERSION
:=057342245c79fbec788ac9873a85de77d0c0a5b8
17 PKG_MIRROR_HASH
:=20ca7c78a38555b125337538f33a1cf0e79f0062259d387f3ada57019086e8e7
19 PKG_MAINTAINER
:=Hans Dedecker
<dedeckeh@gmail.com
>
22 include $(INCLUDE_DIR
)/package.mk
23 include $(INCLUDE_DIR
)/cmake.mk
25 CMAKE_OPTIONS
+= -DUBUS
=1
30 TITLE
:=OpenWrt DHCP
/DHCPv6
(-PD
)/RA Server
& Relay
31 DEPENDS
:=+libubox
+libuci
+libubus
+libnl-tiny
34 define Package
/odhcpd
/config
36 depends on PACKAGE_odhcpd
38 config PACKAGE_odhcpd_ext_cer_id
41 prompt
"CER-ID Extension ID (0 = disabled)"
43 config PACKAGE_odhcpd_dhcpv4_support
46 prompt
"Enable DHCPv4 server support"
50 ifneq ($(CONFIG_PACKAGE_odhcpd_ext_cer_id
),0)
51 CMAKE_OPTIONS
+= -DEXT_CER_ID
=$(CONFIG_PACKAGE_odhcpd_ext_cer_id
)
54 ifeq ($(CONFIG_PACKAGE_odhcpd_dhcpv4_support
),y
)
55 CMAKE_OPTIONS
+= -DDHCPV4_SUPPORT
=1
59 define Package
/odhcpd
/description
60 odhcpd is a daemon for serving and relaying IP management protocols to
61 configure clients and downstream routers. It tries to follow the RFC
6204
62 requirements for IPv6 home routers.
64 odhcpd provides server services for DHCP
, RA
, stateless and stateful DHCPv6
,
65 prefix delegation and can be used to relay RA
, DHCPv6 and NDP between routed
66 (non-bridged
) interfaces in case no delegated prefixes are available.
69 define Package
/odhcpd
/install
70 $(INSTALL_DIR
) $(1)/usr
/sbin
/
71 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/odhcpd
$(1)/usr
/sbin
/
72 $(INSTALL_BIN
) .
/files
/odhcpd-update
$(1)/usr
/sbin
/
73 $(INSTALL_DIR
) $(1)/etc
/init.d
74 $(INSTALL_BIN
) .
/files
/odhcpd.init
$(1)/etc
/init.d
/odhcpd
75 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
76 $(INSTALL_BIN
) .
/files
/odhcpd.defaults
$(1)/etc
/uci-defaults
79 $(eval
$(call BuildPackage
,odhcpd
))