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.

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