Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #
  2. # Copyright (C) 2013 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_VERSION:=2014-06-15
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=git://github.com/sbyx/odhcpd.git
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=521ffa12eb85561b5ca3de2f807485bcb004cf42
  16. PKG_MAINTAINER:=Steven Barth <[email protected]>
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. CMAKE_OPTIONS += -DUBUS=1
  20. ifneq ($(CONFIG_PACKAGE_odhcpd_ext_prefix_class),0)
  21. CMAKE_OPTIONS += -DEXT_PREFIX_CLASS=$(CONFIG_PACKAGE_odhcpd_ext_prefix_class)
  22. endif
  23. ifneq ($(CONFIG_PACKAGE_odhcpd_ext_cer_id),0)
  24. CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcpd_ext_cer_id)
  25. endif
  26. define Package/odhcpd
  27. SECTION:=net
  28. CATEGORY:=Network
  29. TITLE:=OpenWrt DHCP/DHCPv6(-PD)/RA Server & Relay
  30. DEPENDS:=+libubox +libuci +libubus
  31. endef
  32. define Package/odhcpd/config
  33. config PACKAGE_odhcpd_ext_prefix_class
  34. int "Prefix Class Extension ID (0 = disabled)"
  35. depends on PACKAGE_odhcpd
  36. default 0
  37. config PACKAGE_odhcpd_ext_cer_id
  38. int "CER-ID Extension ID (0 = disabled)"
  39. depends on PACKAGE_odhcpd
  40. default 0
  41. endef
  42. define Package/odhcpd/description
  43. odhcpd is a daemon for serving and relaying IP management protocols to
  44. configure clients and downstream routers. It tries to follow the RFC 6204
  45. requirements for IPv6 home routers.
  46. odhcpd provides server services for DHCP, RA, stateless and stateful DHCPv6,
  47. prefix delegation and can be used to relay RA, DHCPv6 and NDP between routed
  48. (non-bridged) interfaces in case no delegated prefixes are available.
  49. endef
  50. define Package/odhcpd/install
  51. $(INSTALL_DIR) $(1)/usr/sbin/
  52. $(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcpd $(1)/usr/sbin/
  53. $(INSTALL_BIN) ./files/odhcpd-update $(1)/usr/sbin/
  54. $(INSTALL_DIR) $(1)/etc/init.d
  55. $(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd
  56. $(INSTALL_DIR) $(1)/etc/uci-defaults
  57. $(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults
  58. endef
  59. $(eval $(call BuildPackage,odhcpd))