Advertisement
Guest User

WIDE-DHCPv6 Makefile

a guest
Jan 25th, 2022
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.75 KB | None | 0 0
  1. #
  2. # Copyright (C) 2010-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.  
  8. include $(TOPDIR)/rules.mk
  9.  
  10. PKG_NAME:=wide-dhcpv6
  11. PKG_SOURCE_DATE:=2022-01-24
  12. PKG_RELEASE:=1
  13.  
  14. PKG_SOURCE_URL:=https://github.com/Fail-Safe/$(PKG_NAME)
  15. PKG_SOURCE_PROTO:=git
  16. PKG_SOURCE_VERSION:=d750b3516b7eb6bbe72c4a80864231a2e4bb27e1
  17. PKG_MIRROR_HASH:=skip
  18.  
  19. include $(INCLUDE_DIR)/package.mk
  20.  
  21. define Package/wide-dhcpv6/Default
  22.   SECTION:=net
  23.   CATEGORY:=Network
  24.   DEPENDS:=@IPV6
  25.   TITLE:=WIDE-DHCPv6
  26.   SUBMENU:=wide-dhcpv6
  27.   URL:=https://sourceforge.net/projects/wide-dhcpv6/
  28.   MAINTAINER:=Mark Baker <mark@e-bakers.com>
  29. endef
  30.  
  31. define Package/wide-dhcpv6-client
  32.   $(call Package/wide-dhcpv6/Default)
  33.   TITLE+= client
  34. endef
  35.  
  36. define Package/wide-dhcpv6-client/description
  37.     WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol
  38.     for IPv6 (DHCPv6) originally developed by the KAME project. The implementation
  39.     mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc.
  40.  
  41.     This package installs the client component.
  42. endef
  43.  
  44. define Package/wide-dhcpv6-server
  45.   $(call Package/wide-dhcpv6/Default)
  46.   TITLE+= server
  47. endef
  48.  
  49. define Package/wide-dhcpv6-server/description
  50.     WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol
  51.     for IPv6 (DHCPv6) originally developed by the KAME project. The implementation
  52.     mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc.
  53.  
  54.     This package installs the server component.
  55. endef
  56.  
  57. define Package/wide-dhcpv6-relay
  58.   $(call Package/wide-dhcpv6/Default)
  59.   TITLE+= relay
  60. endef
  61.  
  62. define Package/wide-dhcpv6-relay/description
  63.     WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol
  64.     for IPv6 (DHCPv6) originally developed by the KAME project. The implementation
  65.     mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc.
  66.  
  67.     This package installs the relay component.
  68. endef
  69.  
  70. define Package/wide-dhcpv6-control
  71.   $(call Package/wide-dhcpv6/Default)
  72.   TITLE+= client and server control utility
  73. endef
  74.  
  75. define Package/wide-dhcpv6-control/description
  76.     WIDE-DHCPv6 is an open-source implementation of Dynamic Host Configuration Protocol
  77.     for IPv6 (DHCPv6) originally developed by the KAME project. The implementation
  78.     mainly conforms to the following standards: RFC3315,3319,3633,3646,4075,4272,etc.
  79.  
  80.     This package installs the client and server control utility.
  81. endef
  82.  
  83. TARGET_CFLAGS += \
  84.     -D_GNU_SOURCE \
  85.     -I$(PKG_BUILD_DIR)
  86.  
  87. MAKE_FLAGS += \
  88.     CONFIGURE_ARGS="$(CONFIGURE_ARGS)" \
  89.     CFLAGS="$(TARGET_CFLAGS)"
  90.  
  91. define Build/Configure
  92.     $(call Build/Configure/Default,--with-localdbdir=/var)
  93. endef
  94.  
  95. define Build/Compile
  96.     $(MAKE) -C $(PKG_BUILD_DIR) \
  97.         DESTDIR="$(PKG_INSTALL_DIR)" \
  98.         EXTRA_CFLAGS="-include debug.h" \
  99.         all
  100. endef
  101.  
  102. define Package/wide-dhcpv6-client/conffiles
  103. /etc/config/dhcp6c
  104. endef
  105.  
  106. define Package/wide-dhcpv6-client/install
  107.     $(INSTALL_DIR) $(1)/usr/sbin
  108.     $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6c $(1)/usr/sbin
  109.     $(INSTALL_DIR) $(1)/etc/config
  110.     $(INSTALL_CONF) ./files/dhcp6c.config $(1)/etc/config/dhcp6c
  111.     $(INSTALL_DIR) $(1)/etc/init.d
  112.     $(INSTALL_BIN) ./files/dhcp6c.init $(1)/etc/init.d/dhcp6c
  113.     $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  114.     $(INSTALL_DATA) ./files/dhcp6c.hotplug $(1)/etc/hotplug.d/iface/40-dhcp6c
  115.     $(INSTALL_DIR) $(1)/etc/hotplug.d/dhcp6c
  116.     $(INSTALL_DATA) ./files/dhcp6c-dnsmasq.hotplug $(1)/etc/hotplug.d/dhcp6c/10-dnsmasq
  117.     $(INSTALL_DATA) ./files/dhcp6c-radvd.hotplug $(1)/etc/hotplug.d/dhcp6c/20-radvd
  118.     $(INSTALL_DIR) $(1)/usr/bin
  119.     $(INSTALL_BIN) ./files/dhcp6c-state $(1)/usr/bin/dhcp6c-state
  120. endef
  121.  
  122. define Package/wide-dhcpv6-server/conffiles
  123. /etc/config/dhcp6s
  124. endef
  125.  
  126. define Package/wide-dhcpv6-server/install
  127.     $(INSTALL_DIR) $(1)/usr/sbin
  128.     $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6s $(1)/usr/sbin
  129.     $(INSTALL_DIR) $(1)/etc
  130.     $(INSTALL_CONF) $(PKG_BUILD_DIR)/dhcp6s.conf.sample $(1)/etc
  131.     $(INSTALL_DIR) $(1)/etc/config
  132.     $(INSTALL_CONF) ./files/dhcp6s.config $(1)/etc/config/dhcp6s
  133.     $(INSTALL_DIR) $(1)/etc/init.d
  134.     $(INSTALL_BIN) ./files/dhcp6s.init $(1)/etc/init.d/dhcp6s
  135.     $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  136.     $(INSTALL_DATA) ./files/dhcp6s.hotplug $(1)/etc/hotplug.d/iface/50-dhcp6s
  137. endef
  138.  
  139. define Package/wide-dhcpv6-relay/install
  140.     $(INSTALL_DIR) $(1)/usr/sbin
  141.     $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6relay $(1)/usr/sbin
  142. endef
  143.  
  144. define Package/wide-dhcpv6-control/install
  145.     $(INSTALL_DIR) $(1)/usr/sbin
  146.     $(INSTALL_BIN) $(PKG_BUILD_DIR)/dhcp6ctl $(1)/usr/sbin
  147. endef
  148.  
  149. $(eval $(call BuildPackage,wide-dhcpv6-client))
  150. $(eval $(call BuildPackage,wide-dhcpv6-server))
  151. $(eval $(call BuildPackage,wide-dhcpv6-relay))
  152. $(eval $(call BuildPackage,wide-dhcpv6-control))
  153.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement