Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #
  2. # Copyright (C) 2013-2025 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=odhcpd
  9. PKG_RELEASE:=1
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
  12. PKG_MIRROR_HASH:=059c93e48b74880882d80c590d1aa221c849c54814379396c634e5b1c2ccfac4
  13. PKG_SOURCE_DATE:=2025-12-18
  14. PKG_SOURCE_VERSION:=3fda5f8b121bf58f8ef8e797fe6bfd7f4f340653
  15. PKG_MAINTAINER:=Álvaro Fernández Rojas <[email protected]>
  16. PKG_LICENSE:=GPL-2.0
  17. PKG_ASLR_PIE_REGULAR:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/odhcpd/default
  21. SECTION:=net
  22. CATEGORY:=Network
  23. DEPENDS:=+libjson-c +libubox +libuci +libubus +libnl-tiny
  24. endef
  25. define Package/odhcpd/default/description
  26. odhcpd is a daemon for serving and relaying IP management protocols to
  27. configure clients and downstream routers. It tries to follow the RFC 6204
  28. requirements for IPv6 home routers.
  29. endef
  30. define Package/odhcpd
  31. $(Package/odhcpd/default)
  32. TITLE:=OpenWrt DHCPv4/DHCPv6/NDP/RA server
  33. VARIANT:=full
  34. endef
  35. define Package/odhcpd/description
  36. $(Package/odhcpd/default/description)
  37. This is a variant with support for RA, DHCPv4 and DHCPv6. It can also be used
  38. to relay RA, DHCPv6 and NDP messages between routed (non-bridged) interfaces
  39. in case no delegated prefixes are available.
  40. endef
  41. define Package/odhcpd-ipv6only
  42. $(Package/odhcpd/default)
  43. TITLE:=OpenWrt DHCPv6/NDP/RA server (without DHCPv4)
  44. VARIANT:=ipv6only
  45. DEPENDS+=@IPV6
  46. endef
  47. define Package/odhcpd-ipv6only/description
  48. $(Package/odhcpd/default/description)
  49. This is a variant with support for RA and DHCPv6. It can also be used to
  50. relay RA, DHCPv6 and NDP messages between routed (non-bridged) interfaces
  51. in case no delegated prefixes are available.
  52. endef
  53. CMAKE_OPTIONS += -DUBUS=1
  54. ifeq ($(BUILD_VARIANT),full)
  55. CMAKE_OPTIONS += -DDHCPV4_SUPPORT=1
  56. endif
  57. define Package/odhcpd/install
  58. $(INSTALL_DIR) $(1)/usr/sbin/
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/odhcpd $(1)/usr/sbin/
  60. $(INSTALL_BIN) ./files/odhcpd-update $(1)/usr/sbin/
  61. $(INSTALL_DIR) $(1)/etc/init.d
  62. $(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd
  63. $(INSTALL_DIR) $(1)/etc/uci-defaults
  64. $(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults/15_odhcpd
  65. endef
  66. Package/odhcpd-ipv6only/install = $(Package/odhcpd/install)
  67. $(eval $(call BuildPackage,odhcpd))
  68. $(eval $(call BuildPackage,odhcpd-ipv6only))