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.

117 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. include $(INCLUDE_DIR)/kernel.mk
  8. PKG_NAME:=jool
  9. PKG_VERSION:=4.0.6
  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:=d9314c9de421c1fa854be83ab8ad6b4ad5062a01a9865a97bb87c5850d1c2b2a
  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. SUBDIRS="$(PKG_BUILD_DIR)/src/mod/nat64" \
  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. SUBDIRS="$(PKG_BUILD_DIR)/src/mod/siit" \
  34. V="$(V)" \
  35. modules
  36. $(call Build/Compile/Default)
  37. endef
  38. define Package/jool/Default
  39. SECTION:=net
  40. CATEGORY:=Network
  41. URL:=https://www.jool.mx
  42. endef
  43. define Package/jool/Default/description
  44. Jool is an Open Source SIIT and NAT64 for Linux.
  45. endef
  46. define Package/jool
  47. $(call Package/jool/Default)
  48. TITLE:=Jool meta-package
  49. DEPENDS:=+kmod-jool +jool-tools
  50. endef
  51. define Package/jool/description
  52. $(call Package/jool/Default/description)
  53. endef
  54. define KernelPackage/jool
  55. SECTION:=kernel
  56. CATEGORY:=Kernel modules
  57. SUBMENU:=Network Support
  58. TITLE:=Jool kernel module
  59. DEPENDS:= \
  60. @IPV6 \
  61. +kmod-crypto-md5 \
  62. +kmod-nf-conntrack \
  63. +kmod-nf-conntrack6 \
  64. +kmod-nf-ipt
  65. FILES:= \
  66. $(PKG_BUILD_DIR)/src/mod/nat64/jool.$(LINUX_KMOD_SUFFIX) \
  67. $(PKG_BUILD_DIR)/src/mod/siit/jool_siit.$(LINUX_KMOD_SUFFIX)
  68. endef
  69. define KernelPackage/jool/description
  70. $(call Package/jool/Default/description)
  71. This package provides the kernel module for Jool.
  72. endef
  73. define Package/jool-tools
  74. $(call Package/jool/Default)
  75. TITLE:=Jool userspace control programs
  76. DEPENDS:=+libnl +libxtables +ethtool
  77. endef
  78. define Package/jool-tools/description
  79. $(call Package/jool/Default/description)
  80. This package provides the userspace control programs for Jool.
  81. endef
  82. CONFIGURE_ARGS += \
  83. --disable-shared \
  84. --without-bash-completion-dir
  85. CONFIGURE_VARS += \
  86. ac_cv_func_memset=yes \
  87. ac_cv_func_strcasecmp=yes
  88. define Package/jool-tools/install
  89. $(INSTALL_DIR) $(1)/usr/bin/
  90. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool $(1)/usr/bin/
  91. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/joold $(1)/usr/bin/
  92. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jool_siit $(1)/usr/bin/
  93. endef
  94. $(eval $(call BuildPackage,jool))
  95. $(eval $(call KernelPackage,jool))
  96. $(eval $(call BuildPackage,jool-tools))