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.

131 lines
3.2 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. include $(INCLUDE_DIR)/kernel.mk
  8. PKG_NAME:=jool
  9. PKG_VERSION:=4.0.7
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/NICMx/Jool/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=3ea1b8ab7435de4776405ccf83c936b2028f20f860b7d0a462d39e4524564363
  14. PKG_MAINTAINER:=
  15. PKG_LICENSE:=GPL-2.0-only
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone
  20. include $(INCLUDE_DIR)/package.mk
  21. define Build/Compile
  22. $(MAKE) -C "$(LINUX_DIR)" \
  23. KERNEL_DIR="$(LINUX_DIR)" \
  24. ARCH="$(LINUX_KARCH)" \
  25. CROSS_COMPILE="$(TARGET_CROSS)" \
  26. M="$(PKG_BUILD_DIR)/src/mod/common" \
  27. V="$(V)" \
  28. modules
  29. $(MAKE) -C "$(LINUX_DIR)" \
  30. KERNEL_DIR="$(LINUX_DIR)" \
  31. ARCH="$(LINUX_KARCH)" \
  32. CROSS_COMPILE="$(TARGET_CROSS)" \
  33. M="$(PKG_BUILD_DIR)/src/mod/nat64" \
  34. V="$(V)" \
  35. modules
  36. $(MAKE) -C "$(LINUX_DIR)" \
  37. KERNEL_DIR="$(LINUX_DIR)" \
  38. ARCH="$(LINUX_KARCH)" \
  39. CROSS_COMPILE="$(TARGET_CROSS)" \
  40. M="$(PKG_BUILD_DIR)/src/mod/siit" \
  41. V="$(V)" \
  42. modules
  43. $(call Build/Compile/Default)
  44. endef
  45. define Package/jool/Default
  46. SECTION:=net
  47. CATEGORY:=Network
  48. URL:=https://www.jool.mx
  49. endef
  50. define Package/jool/Default/description
  51. Jool is an Open Source SIIT and NAT64 for Linux.
  52. endef
  53. define Package/jool
  54. $(call Package/jool/Default)
  55. TITLE:=Jool meta-package
  56. DEPENDS:=+kmod-jool +jool-tools
  57. endef
  58. define Package/jool/description
  59. $(call Package/jool/Default/description)
  60. endef
  61. define KernelPackage/jool
  62. SECTION:=kernel
  63. CATEGORY:=Kernel modules
  64. SUBMENU:=Network Support
  65. TITLE:=Jool kernel module
  66. DEPENDS:= \
  67. @IPV6 \
  68. +kmod-crypto-md5 \
  69. +kmod-nf-conntrack \
  70. +kmod-nf-conntrack6 \
  71. +kmod-nf-ipt
  72. FILES:= \
  73. $(PKG_BUILD_DIR)/src/mod/common/jool_common.$(LINUX_KMOD_SUFFIX) \
  74. $(PKG_BUILD_DIR)/src/mod/nat64/jool.$(LINUX_KMOD_SUFFIX) \
  75. $(PKG_BUILD_DIR)/src/mod/siit/jool_siit.$(LINUX_KMOD_SUFFIX)
  76. endef
  77. define KernelPackage/jool/description
  78. $(call Package/jool/Default/description)
  79. This package provides the kernel module for Jool.
  80. endef
  81. define Package/jool-tools
  82. $(call Package/jool/Default)
  83. TITLE:=Jool userspace control programs
  84. DEPENDS:=+libnl +libxtables
  85. endef
  86. define Package/jool-tools/description
  87. $(call Package/jool/Default/description)
  88. This package provides the userspace control programs for Jool.
  89. endef
  90. CONFIGURE_ARGS += \
  91. --disable-shared \
  92. --without-bash-completion-dir
  93. CONFIGURE_VARS += \
  94. ac_cv_func_memset=yes \
  95. ac_cv_func_strcasecmp=yes
  96. define Package/jool-tools/install
  97. $(INSTALL_DIR) $(1)/usr/bin/
  98. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool $(1)/usr/bin/
  99. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/joold $(1)/usr/bin/
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool_siit $(1)/usr/bin/
  101. $(INSTALL_DIR) $(1)/usr/lib/iptables
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/iptables/libxt_JOOL_SIIT.so \
  103. $(1)/usr/lib/iptables
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/iptables/libxt_JOOL.so \
  105. $(1)/usr/lib/iptables
  106. endef
  107. $(eval $(call BuildPackage,jool))
  108. $(eval $(call KernelPackage,jool))
  109. $(eval $(call BuildPackage,jool-tools))