Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #
  2. # Copyright (C) 2013-2015 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:=3
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL=$(PROJECT_GIT)/odhcpd.git
  12. PKG_SOURCE_DATE:=2020-05-03
  13. PKG_SOURCE_VERSION:=49e4949c6dee4a7e528e9bc51e9813228c3c16d8
  14. PKG_MIRROR_HASH:=5e23b60211a171d17d7015ce604b5fa128f0fbe4d7e7ddd48063b40590e17d4c
  15. PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
  16. PKG_LICENSE:=GPL-2.0
  17. PKG_INSTALL:=1
  18. PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/odhcpd/default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. TITLE:=libreCMC DHCPv6(-PD)/RA Server & Relay
  25. DEPENDS:=+libubox +libuci +libubus +libnl-tiny
  26. endef
  27. define Package/odhcpd/default/description
  28. odhcpd is a daemon for serving and relaying IP management protocols to
  29. configure clients and downstream routers. It tries to follow the RFC 6204
  30. requirements for IPv6 home routers.
  31. endef
  32. define Package/odhcpd/default/config
  33. menu "Configuration"
  34. depends on PACKAGE_$(1)
  35. config PACKAGE_odhcpd_$(2)_ext_cer_id
  36. int
  37. default 0
  38. prompt "CER-ID Extension ID (0 = disabled)"
  39. endmenu
  40. endef
  41. define Package/odhcpd
  42. $(call Package/odhcpd/default)
  43. TITLE += and DHCPv4 server
  44. VARIANT:=full
  45. endef
  46. Package/odhcpd/config=$(call Package/odhcpd/default/config,odhcpd,full)
  47. define Package/odhcpd/description
  48. $(call Package/odhcpd/default/description)
  49. This is a variant providing server services for DHCPv4, RA, stateless and
  50. stateful DHCPv6, prefix delegation and can be used to relay RA, DHCPv6 and
  51. NDP between routed (non-bridged) interfaces in case no delegated prefixes
  52. are available.
  53. endef
  54. define Package/odhcpd-ipv6only
  55. $(call Package/odhcpd/default)
  56. VARIANT:=ipv6only
  57. DEPENDS+= @IPV6
  58. endef
  59. Package/odhcpd-ipv6only/config=$(call Package/odhcpd/default/config,odhcpd-ipv6only,ipv6only)
  60. define Package/odhcpd-ipv6only/description
  61. $(call Package/odhcpd/default/description)
  62. This is a variant providing server services for RA, stateless and stateful
  63. DHCPv6, prefix delegation and can be used to relay RA, DHCPv6 and NDP between
  64. routed (non-bridged) interfaces in case no delegated prefixes are available.
  65. endef
  66. CMAKE_OPTIONS += -DUBUS=1
  67. ifeq ($(BUILD_VARIANT),full)
  68. CMAKE_OPTIONS += -DDHCPV4_SUPPORT=1
  69. endif
  70. ifneq ($(CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id),0)
  71. CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id)
  72. endif
  73. define Package/odhcpd/install
  74. $(INSTALL_DIR) $(1)/usr/sbin/
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/odhcpd $(1)/usr/sbin/
  76. $(INSTALL_BIN) ./files/odhcpd-update $(1)/usr/sbin/
  77. $(INSTALL_DIR) $(1)/etc/init.d
  78. $(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd
  79. $(INSTALL_DIR) $(1)/etc/uci-defaults
  80. $(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults
  81. endef
  82. Package/odhcpd-ipv6only/install = $(Package/odhcpd/install)
  83. $(eval $(call BuildPackage,odhcpd))
  84. $(eval $(call BuildPackage,odhcpd-ipv6only))