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.

111 lines
2.7 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:=3.5.7
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/NICMx/Jool/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=b8e95d1526cd2434dedbae292afd2d17f0780ac2dca2be21264712b41eb76a3d
  14. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/Jool-$(PKG_VERSION)
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
  19. PKG_FIXUP:=autoreconf
  20. include $(INCLUDE_DIR)/package.mk
  21. MAKE_PATH:=usr
  22. CONFIGURE_PATH:=usr
  23. define Build/Compile
  24. $(MAKE) -C "$(LINUX_DIR)" \
  25. KERNEL_DIR="$(LINUX_DIR)" \
  26. ARCH="$(LINUX_KARCH)" \
  27. CROSS_COMPILE="$(TARGET_CROSS)" \
  28. SUBDIRS="$(PKG_BUILD_DIR)/mod/stateful" \
  29. V="$(V)" \
  30. modules
  31. $(MAKE) -C "$(LINUX_DIR)" \
  32. KERNEL_DIR="$(LINUX_DIR)" \
  33. ARCH="$(LINUX_KARCH)" \
  34. CROSS_COMPILE="$(TARGET_CROSS)" \
  35. SUBDIRS="$(PKG_BUILD_DIR)/mod/stateless" \
  36. V="$(V)" \
  37. modules
  38. $(call Build/Compile/Default)
  39. endef
  40. define Package/jool/Default
  41. SECTION:=net
  42. CATEGORY:=Network
  43. URL:=https://www.jool.mx
  44. endef
  45. define Package/jool/Default/description
  46. Jool is an Open Source SIIT and NAT64 for Linux.
  47. endef
  48. define Package/jool
  49. $(call Package/jool/Default)
  50. TITLE:=Jool meta-package
  51. DEPENDS:=+kmod-jool +jool-tools
  52. endef
  53. define Package/jool/description
  54. $(call Package/jool/Default/description)
  55. endef
  56. define KernelPackage/jool
  57. SECTION:=kernel
  58. CATEGORY:=Kernel modules
  59. SUBMENU:=Network Support
  60. TITLE:=Jool kernel module
  61. DEPENDS:= \
  62. @IPV6 \
  63. +kmod-crypto-md5 \
  64. +kmod-nf-conntrack \
  65. +kmod-nf-conntrack6
  66. FILES:= \
  67. $(PKG_BUILD_DIR)/mod/stateful/jool.$(LINUX_KMOD_SUFFIX) \
  68. $(PKG_BUILD_DIR)/mod/stateless/jool_siit.$(LINUX_KMOD_SUFFIX)
  69. endef
  70. define KernelPackage/jool/description
  71. $(call Package/jool/Default/description)
  72. This package provides the kernel module for Jool.
  73. endef
  74. define Package/jool-tools
  75. $(call Package/jool/Default)
  76. TITLE:=Jool userspace control programs
  77. DEPENDS:=+libnl +ethtool
  78. endef
  79. define Package/jool-tools/description
  80. $(call Package/jool/Default/description)
  81. This package provides the userspace control programs for Jool.
  82. endef
  83. define Package/jool-tools/install
  84. $(INSTALL_DIR) $(1)/usr/sbin/
  85. $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateful/jool $(1)/usr/sbin/
  86. $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/stateless/jool_siit $(1)/usr/sbin/
  87. endef
  88. $(eval $(call BuildPackage,jool))
  89. $(eval $(call KernelPackage,jool))
  90. $(eval $(call BuildPackage,jool-tools))