Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #
  2. # Copyright (C) 2012 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:=odhcp6c
  9. PKG_VERSION:=2014-04-09
  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/odhcp6c.git
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=6bbd2b0208fc17b6566595bfdfef2ff1d012d143
  16. PKG_MAINTAINER:=Steven Barth <[email protected]>
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_prefix_class),0)
  20. CMAKE_OPTIONS += -DEXT_PREFIX_CLASS=$(CONFIG_PACKAGE_odhcp6c_ext_prefix_class)
  21. endif
  22. ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_cer_id),0)
  23. CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcp6c_ext_cer_id)
  24. endif
  25. define Package/odhcp6c
  26. SECTION:=net
  27. CATEGORY:=Network
  28. TITLE:=Embedded DHCPv6-client for OpenWrt
  29. DEPENDS:=+kmod-ipv6
  30. endef
  31. define Package/odhcp6c/config
  32. config PACKAGE_odhcp6c_ext_prefix_class
  33. int "Prefix Class Extension ID (0 = disabled)"
  34. depends on PACKAGE_odhcp6c
  35. default 0
  36. config PACKAGE_odhcp6c_ext_cer_id
  37. int "CER-ID Extension ID (0 = disabled)"
  38. depends on PACKAGE_odhcp6c
  39. default 0
  40. endef
  41. define Package/odhcp6c/install
  42. $(INSTALL_DIR) $(1)/usr/sbin/
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcp6c $(1)/usr/sbin/
  44. $(INSTALL_DIR) $(1)/lib/netifd/proto
  45. $(INSTALL_BIN) ./files/dhcpv6.sh $(1)/lib/netifd/proto/dhcpv6.sh
  46. $(INSTALL_BIN) ./files/dhcpv6.script $(1)/lib/netifd/
  47. endef
  48. $(eval $(call BuildPackage,odhcp6c))