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.

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