1
0

Makefile 3.1 KB

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