You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
2.8 KiB

  1. #
  2. # Copyright (C) 2016-2017 Dan Luedtke <mail@danrl.com>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=jool
  8. PKG_VERSION:=2018.01.17
  9. PKG_RELEASE:=2
  10. PKG_LICENSE:=GPL-3.0
  11. PKG_LICENSE_FILES:=COPYING
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/NICMx/Jool.git
  14. PKG_SOURCE_VERSION:=9dfaf22e49f7905d94af9b73f9bee22c26d7dd4a
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
  17. PKG_MIRROR_HASH:=79b558561f06f3df01a541b1d39b7d3d88f91d0ee6b8ce3abf91ebbed737225a
  18. PKG_BUILD_DIR=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
  21. PKG_FIXUP:=autoreconf
  22. include $(INCLUDE_DIR)/kernel.mk
  23. include $(INCLUDE_DIR)/package.mk
  24. MAKE_PATH:=usr
  25. CONFIGURE_PATH:=usr
  26. define Build/Compile
  27. $(MAKE) -C "$(LINUX_DIR)" \
  28. KERNEL_DIR="$(LINUX_DIR)" \
  29. ARCH="$(LINUX_KARCH)" \
  30. CROSS_COMPILE="$(TARGET_CROSS)" \
  31. SUBDIRS="$(PKG_BUILD_DIR)/mod/stateful" \
  32. V="$(V)" \
  33. modules
  34. $(MAKE) -C "$(LINUX_DIR)" \
  35. KERNEL_DIR="$(LINUX_DIR)" \
  36. ARCH="$(LINUX_KARCH)" \
  37. CROSS_COMPILE="$(TARGET_CROSS)" \
  38. SUBDIRS="$(PKG_BUILD_DIR)/mod/stateless" \
  39. V="$(V)" \
  40. modules
  41. $(call Build/Compile/Default)
  42. endef
  43. define Package/jool/Default
  44. SECTION:=net
  45. CATEGORY:=Network
  46. URL:=https://www.jool.mx
  47. MAINTAINER:=Dan Luedtke <mail@danrl.com>
  48. endef
  49. define Package/jool/Default/description
  50. Jool is an Open Source SIIT and NAT64 for Linux.
  51. endef
  52. define Package/jool
  53. $(call Package/jool/Default)
  54. TITLE:=Jool meta-package
  55. DEPENDS:=+kmod-jool +jool-tools
  56. endef
  57. define Package/jool/description
  58. $(call Package/jool/Default/description)
  59. endef
  60. define KernelPackage/jool
  61. SECTION:=kernel
  62. CATEGORY:=Kernel modules
  63. SUBMENU:=Network Support
  64. TITLE:=Jool kernel module
  65. DEPENDS:= \
  66. @IPV6 \
  67. +kmod-crypto-md5 \
  68. +kmod-nf-conntrack \
  69. +kmod-nf-conntrack6
  70. FILES:= \
  71. $(PKG_BUILD_DIR)/mod/stateful/jool.$(LINUX_KMOD_SUFFIX) \
  72. $(PKG_BUILD_DIR)/mod/stateless/jool_siit.$(LINUX_KMOD_SUFFIX)
  73. endef
  74. define KernelPackage/jool/description
  75. $(call Package/jool/Default/description)
  76. This package provides the kernel module for Jool.
  77. endef
  78. define Package/jool-tools
  79. $(call Package/jool/Default)
  80. TITLE:=Jool userspace control programs
  81. DEPENDS:=+libnl +ethtool
  82. endef
  83. define Package/jool-tools/description
  84. $(call Package/jool/Default/description)
  85. This package provides the userspace control programs for Jool.
  86. endef
  87. define Package/jool-tools/install
  88. $(INSTALL_DIR) $(1)/usr/sbin/
  89. $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateful/jool $(1)/usr/sbin/
  90. $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateless/jool_siit $(1)/usr/sbin/
  91. endef
  92. $(eval $(call BuildPackage,jool))
  93. $(eval $(call KernelPackage,jool))
  94. $(eval $(call BuildPackage,jool-tools))