1
0

Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #
  2. # Copyright (C) 2016 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:=2016.12.17
  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:=66a791c90751d7941b08c142babe1deec73d0996
  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))