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
=$(PROJECT_GIT
)/project
/odhcpd.git
15 PKG_SOURCE_DATE
:=2019-09-09
16 PKG_SOURCE_VERSION
:=e73bf11dee1073aaaddc0dc67ca8c7d75ae3c6ad
17 PKG_MIRROR_HASH
:=56f9222996aa1ad0729d95e43a1c5e0892c1de41527e906a1bd704ef888da182
19 PKG_MAINTAINER
:=Hans Dedecker
<dedeckeh@gmail.com
>
23 PKG_CONFIG_DEPENDS
:=CONFIG_PACKAGE_odhcpd_
$(BUILD_VARIANT
)_ext_cer_id
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/cmake.mk
28 define Package
/odhcpd
/default
31 TITLE
:=OpenWrt DHCPv6
(-PD
)/RA Server
& Relay
32 DEPENDS
:=+libubox
+libuci
+libubus
+libnl-tiny
35 define Package
/odhcpd
/default
/description
36 odhcpd is a daemon for serving and relaying IP management protocols to
37 configure clients and downstream routers. It tries to follow the RFC
6204
38 requirements for IPv6 home routers.
41 define Package
/odhcpd
/default
/config
43 depends on PACKAGE_
$(1)
45 config PACKAGE_odhcpd_
$(2)_ext_cer_id
48 prompt
"CER-ID Extension ID (0 = disabled)"
53 $(call Package
/odhcpd
/default
)
54 TITLE
+= and DHCPv4 server
58 Package
/odhcpd
/config
=$(call Package
/odhcpd
/default
/config
,odhcpd
,full
)
60 define Package
/odhcpd
/description
61 $(call Package
/odhcpd
/default
/description
)
63 This is a variant providing server services for DHCPv4
, RA
, stateless and
64 stateful DHCPv6
, prefix delegation and can be used to relay RA
, DHCPv6 and
65 NDP between routed
(non-bridged
) interfaces in case no delegated prefixes
69 define Package
/odhcpd-ipv6only
70 $(call Package
/odhcpd
/default
)
75 Package
/odhcpd-ipv6only
/config
=$(call Package
/odhcpd
/default
/config
,odhcpd-ipv6only
,ipv6only
)
77 define Package
/odhcpd-ipv6only
/description
78 $(call Package
/odhcpd
/default
/description
)
80 This is a variant providing server services for RA
, stateless and stateful
81 DHCPv6
, prefix delegation and can be used to relay RA
, DHCPv6 and NDP between
82 routed
(non-bridged
) interfaces in case no delegated prefixes are available.
85 CMAKE_OPTIONS
+= -DUBUS
=1
87 ifeq ($(BUILD_VARIANT
),full
)
88 CMAKE_OPTIONS
+= -DDHCPV4_SUPPORT
=1
91 ifneq ($(CONFIG_PACKAGE_odhcpd_
$(BUILD_VARIANT
)_ext_cer_id
),0)
92 CMAKE_OPTIONS
+= -DEXT_CER_ID
=$(CONFIG_PACKAGE_odhcpd_
$(BUILD_VARIANT
)_ext_cer_id
)
95 define Package
/odhcpd
/install
96 $(INSTALL_DIR
) $(1)/usr
/sbin
/
97 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/odhcpd
$(1)/usr
/sbin
/
98 $(INSTALL_BIN
) .
/files
/odhcpd-update
$(1)/usr
/sbin
/
99 $(INSTALL_DIR
) $(1)/etc
/init.d
100 $(INSTALL_BIN
) .
/files
/odhcpd.init
$(1)/etc
/init.d
/odhcpd
101 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
102 $(INSTALL_BIN
) .
/files
/odhcpd.defaults
$(1)/etc
/uci-defaults
105 Package
/odhcpd-ipv6only
/install = $(Package
/odhcpd
/install)
107 $(eval
$(call BuildPackage
,odhcpd
))
108 $(eval
$(call BuildPackage
,odhcpd-ipv6only
))