No Description

Makefile 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. #
  2. # Copyright (C) 2012-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=fastd
  9. PKG_VERSION:=14
  10. PKG_RELEASE:=2
  11. PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/75
  14. PKG_MD5SUM:=34f6bdebd0410a1fba7c8fd06fff7a05
  15. PKG_LICENSE:=BSD-2-Clause
  16. PKG_LICENSE_FILE:=COPYRIGHT
  17. PKG_CONFIG_DEPENDS:=\
  18. CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST \
  19. CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC \
  20. CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC \
  21. CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305 \
  22. CONFIG_FASTD_ENABLE_METHOD_NULL \
  23. CONFIG_FASTD_ENABLE_METHOD_XSALSA20_POLY1305 \
  24. CONFIG_FASTD_ENABLE_CIPHER_AES128_CTR \
  25. CONFIG_FASTD_ENABLE_CIPHER_NULL \
  26. CONFIG_FASTD_ENABLE_CIPHER_SALSA20 \
  27. CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 \
  28. CONFIG_FASTD_ENABLE_MAC_GHASH \
  29. CONFIG_FASTD_WITH_CMDLINE_USER \
  30. CONFIG_FASTD_WITH_CMDLINE_LOGGING \
  31. CONFIG_FASTD_WITH_CMDLINE_OPERATION \
  32. CONFIG_FASTD_WITH_CMDLINE_COMMANDS \
  33. CONFIG_FASTD_WITH_VERIFY
  34. PKG_BUILD_DEPENDS:=nacl libuecc
  35. include $(INCLUDE_DIR)/package.mk
  36. include $(INCLUDE_DIR)/cmake.mk
  37. define Package/fastd
  38. SECTION:=net
  39. CATEGORY:=Network
  40. DEPENDS:=+kmod-tun +librt +libpthread
  41. TITLE:=Fast and Secure Tunneling Daemon
  42. URL:=https://projects.universe-factory.net/projects/fastd
  43. SUBMENU:=VPN
  44. endef
  45. define Package/fastd/config
  46. source "$(SOURCE)/Config.in"
  47. endef
  48. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  49. TARGET_LDFLAGS += -Wl,--gc-sections
  50. CMAKE_OPTIONS += \
  51. -DCMAKE_BUILD_TYPE:STRING=MINSIZEREL \
  52. -DWITH_METHOD_CIPHER_TEST:BOOL=FALSE \
  53. -DWITH_METHOD_COMPOSED_GMAC:BOOL=FALSE \
  54. -DWITH_METHOD_GENERIC_GMAC:BOOL=FALSE \
  55. -DWITH_METHOD_GENERIC_POLY1305:BOOL=FALSE \
  56. -DWITH_METHOD_NULL:BOOL=FALSE \
  57. -DWITH_METHOD_XSALSA20_POLY1305:BOOL=FALSE \
  58. -DWITH_CIPHER_AES128_CTR:BOOL=FALSE \
  59. -DWITH_CIPHER_NULL:BOOL=FALSE \
  60. -DWITH_CIPHER_SALSA20:BOOL=FALSE \
  61. -DWITH_CIPHER_SALSA2012:BOOL=FALSE \
  62. -DWITH_MAC_GHASH:BOOL=FALSE \
  63. -DWITH_CMDLINE_USER:BOOL=FALSE \
  64. -DWITH_CMDLINE_LOGGING:BOOL=FALSE \
  65. -DWITH_CMDLINE_OPERATION:BOOL=FALSE \
  66. -DWITH_CMDLINE_COMMANDS:BOOL=FALSE \
  67. -DWITH_VERIFY:BOOL=FALSE \
  68. -DWITH_CAPABILITIES:BOOL=FALSE \
  69. -DENABLE_SYSTEMD:BOOL=FALSE \
  70. -DENABLE_LIBSODIUM:BOOL=FALSE
  71. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST),y)
  72. CMAKE_OPTIONS += -DWITH_METHOD_CIPHER_TEST:BOOL=TRUE
  73. endif
  74. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC),y)
  75. CMAKE_OPTIONS += -DWITH_METHOD_COMPOSED_GMAC:BOOL=TRUE
  76. endif
  77. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC),y)
  78. CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_GMAC:BOOL=TRUE
  79. endif
  80. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305),y)
  81. CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_POLY1305:BOOL=TRUE
  82. endif
  83. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_NULL),y)
  84. CMAKE_OPTIONS += -DWITH_METHOD_NULL:BOOL=TRUE
  85. endif
  86. ifeq ($(CONFIG_FASTD_ENABLE_METHOD_XSALSA20_POLY1305),y)
  87. CMAKE_OPTIONS += -DWITH_METHOD_XSALSA20_POLY1305:BOOL=TRUE
  88. endif
  89. ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_AES128_CTR),y)
  90. CMAKE_OPTIONS += -DWITH_CIPHER_AES128_CTR:BOOL=TRUE
  91. endif
  92. ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_NULL),y)
  93. CMAKE_OPTIONS += -DWITH_CIPHER_NULL:BOOL=TRUE
  94. endif
  95. ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_SALSA20),y)
  96. CMAKE_OPTIONS += -DWITH_CIPHER_SALSA20:BOOL=TRUE
  97. endif
  98. ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_SALSA2012),y)
  99. CMAKE_OPTIONS += -DWITH_CIPHER_SALSA2012:BOOL=TRUE
  100. endif
  101. ifeq ($(CONFIG_FASTD_ENABLE_MAC_GHASH),y)
  102. CMAKE_OPTIONS += -DWITH_MAC_GHASH:BOOL=TRUE
  103. endif
  104. ifeq ($(CONFIG_FASTD_WITH_CMDLINE_USER),y)
  105. CMAKE_OPTIONS += -DWITH_CMDLINE_USER:BOOL=TRUE
  106. endif
  107. ifeq ($(CONFIG_FASTD_WITH_CMDLINE_LOGGING),y)
  108. CMAKE_OPTIONS += -DWITH_CMDLINE_LOGGING:BOOL=TRUE
  109. endif
  110. ifeq ($(CONFIG_FASTD_WITH_CMDLINE_OPERATION),y)
  111. CMAKE_OPTIONS += -DWITH_CMDLINE_OPERATION:BOOL=TRUE
  112. endif
  113. ifeq ($(CONFIG_FASTD_WITH_CMDLINE_COMMANDS),y)
  114. CMAKE_OPTIONS += -DWITH_CMDLINE_COMMANDS:BOOL=TRUE
  115. endif
  116. ifeq ($(CONFIG_FASTD_WITH_VERIFY),y)
  117. CMAKE_OPTIONS += -DWITH_VERIFY:BOOL=TRUE
  118. endif
  119. define Package/fastd/description
  120. Fast and secure tunneling daemon, which is optimized on small code size and few dependencies
  121. endef
  122. define Package/fastd/conffiles
  123. /etc/config/fastd
  124. endef
  125. define Package/fastd/install
  126. $(INSTALL_DIR) $(1)/usr/bin
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fastd $(1)/usr/bin/
  128. $(INSTALL_DIR) $(1)/etc/init.d/
  129. $(INSTALL_BIN) files/fastd.init $(1)/etc/init.d/fastd
  130. $(INSTALL_DIR) $(1)/etc/config
  131. $(INSTALL_CONF) files/fastd.config $(1)/etc/config/fastd
  132. $(INSTALL_DIR) $(1)/etc/fastd
  133. $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
  134. $(INSTALL_DATA) files/fastd.upgrade $(1)/lib/upgrade/keep.d/fastd
  135. endef
  136. $(eval $(call BuildPackage,fastd))