123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- #
- # Copyright (C) 2012-2015 OpenWrt.org
- #
- # This is free software, licensed under the GNU General Public License v2.
- # See /LICENSE for more information.
- #
- include $(TOPDIR)/rules.mk
- PKG_NAME:=fastd
- PKG_VERSION:=18
- PKG_RELEASE:=2.1
- PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
- PKG_SOURCE_URL:=https://github.com/NeoRaider/fastd/releases/download/v$(PKG_VERSION)
- PKG_MD5SUM:=e53236d3049f64f7955ad9556da099eb
- PKG_LICENSE:=BSD-2-Clause
- PKG_LICENSE_FILES:=COPYRIGHT
- PKG_CONFIG_DEPENDS:=\
- CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST \
- CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC \
- CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC \
- CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC \
- CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305 \
- CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC \
- CONFIG_FASTD_ENABLE_METHOD_NULL \
- CONFIG_FASTD_ENABLE_METHOD_XSALSA20_POLY1305 \
- CONFIG_FASTD_ENABLE_CIPHER_AES128_CTR \
- CONFIG_FASTD_ENABLE_CIPHER_NULL \
- CONFIG_FASTD_ENABLE_CIPHER_SALSA20 \
- CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 \
- CONFIG_FASTD_ENABLE_MAC_GHASH \
- CONFIG_FASTD_ENABLE_MAC_UHASH \
- CONFIG_FASTD_WITH_CAPABILITIES \
- CONFIG_FASTD_WITH_CMDLINE_USER \
- CONFIG_FASTD_WITH_CMDLINE_LOGGING \
- CONFIG_FASTD_WITH_CMDLINE_OPERATION \
- CONFIG_FASTD_WITH_CMDLINE_COMMANDS \
- CONFIG_FASTD_WITH_DYNAMIC_PEERS \
- CONFIG_FASTD_WITH_STATUS_SOCKET
- PKG_BUILD_DEPENDS:=nacl
- include $(INCLUDE_DIR)/package.mk
- include $(INCLUDE_DIR)/cmake.mk
- define Package/fastd
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=+kmod-tun +librt +libpthread +libuecc +FASTD_WITH_STATUS_SOCKET:libjson-c +FASTD_WITH_CAPABILITIES:libcap
- TITLE:=Fast and Secure Tunneling Daemon
- URL:=https://github.com/NeoRaider/fastd/
- SUBMENU:=VPN
- endef
- define Package/fastd/config
- source "$(SOURCE)/Config.in"
- endef
- TARGET_CFLAGS += -ffunction-sections -fdata-sections
- TARGET_LDFLAGS += -Wl,--gc-sections
- CMAKE_OPTIONS += \
- -DCMAKE_BUILD_TYPE:STRING=MINSIZEREL \
- -DWITH_METHOD_CIPHER_TEST:BOOL=FALSE \
- -DWITH_METHOD_COMPOSED_GMAC:BOOL=FALSE \
- -DWITH_METHOD_COMPOSED_UMAC:BOOL=FALSE \
- -DWITH_METHOD_GENERIC_GMAC:BOOL=FALSE \
- -DWITH_METHOD_GENERIC_POLY1305:BOOL=FALSE \
- -DWITH_METHOD_GENERIC_UMAC:BOOL=FALSE \
- -DWITH_METHOD_NULL:BOOL=FALSE \
- -DWITH_METHOD_XSALSA20_POLY1305:BOOL=FALSE \
- -DWITH_CIPHER_AES128_CTR:BOOL=FALSE \
- -DWITH_CIPHER_NULL:BOOL=FALSE \
- -DWITH_CIPHER_SALSA20:BOOL=FALSE \
- -DWITH_CIPHER_SALSA2012:BOOL=FALSE \
- -DWITH_MAC_GHASH:BOOL=FALSE \
- -DWITH_MAC_UHASH:BOOL=FALSE \
- -DWITH_CAPABILITIES:BOOL=FALSE \
- -DWITH_CMDLINE_USER:BOOL=FALSE \
- -DWITH_CMDLINE_LOGGING:BOOL=FALSE \
- -DWITH_CMDLINE_OPERATION:BOOL=FALSE \
- -DWITH_CMDLINE_COMMANDS:BOOL=FALSE \
- -DWITH_DYNAMIC_PEERS:BOOL=FALSE \
- -DWITH_STATUS_SOCKET:BOOL=FALSE \
- -DENABLE_SYSTEMD:BOOL=FALSE \
- -DENABLE_LIBSODIUM:BOOL=FALSE \
- -DENABLE_LTO:BOOL=TRUE
- ifeq ($(CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST),y)
- CMAKE_OPTIONS += -DWITH_METHOD_CIPHER_TEST:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC),y)
- CMAKE_OPTIONS += -DWITH_METHOD_COMPOSED_GMAC:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC),y)
- CMAKE_OPTIONS += -DWITH_METHOD_COMPOSED_UMAC:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC),y)
- CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_GMAC:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305),y)
- CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_POLY1305:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC),y)
- CMAKE_OPTIONS += -DWITH_METHOD_GENERIC_UMAC:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_METHOD_NULL),y)
- CMAKE_OPTIONS += -DWITH_METHOD_NULL:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_METHOD_XSALSA20_POLY1305),y)
- CMAKE_OPTIONS += -DWITH_METHOD_XSALSA20_POLY1305:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_AES128_CTR),y)
- CMAKE_OPTIONS += -DWITH_CIPHER_AES128_CTR:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_NULL),y)
- CMAKE_OPTIONS += -DWITH_CIPHER_NULL:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_SALSA20),y)
- CMAKE_OPTIONS += -DWITH_CIPHER_SALSA20:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_CIPHER_SALSA2012),y)
- CMAKE_OPTIONS += -DWITH_CIPHER_SALSA2012:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_MAC_GHASH),y)
- CMAKE_OPTIONS += -DWITH_MAC_GHASH:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_ENABLE_MAC_UHASH),y)
- CMAKE_OPTIONS += -DWITH_MAC_UHASH:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_WITH_CAPABILITIES),y)
- CMAKE_OPTIONS += -DWITH_CAPABILITIES:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_WITH_CMDLINE_USER),y)
- CMAKE_OPTIONS += -DWITH_CMDLINE_USER:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_WITH_CMDLINE_LOGGING),y)
- CMAKE_OPTIONS += -DWITH_CMDLINE_LOGGING:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_WITH_CMDLINE_OPERATION),y)
- CMAKE_OPTIONS += -DWITH_CMDLINE_OPERATION:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_WITH_CMDLINE_COMMANDS),y)
- CMAKE_OPTIONS += -DWITH_CMDLINE_COMMANDS:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_WITH_DYNAMIC_PEERS),y)
- CMAKE_OPTIONS += -DWITH_DYNAMIC_PEERS:BOOL=TRUE
- endif
- ifeq ($(CONFIG_FASTD_WITH_STATUS_SOCKET),y)
- CMAKE_OPTIONS += -DWITH_STATUS_SOCKET:BOOL=TRUE
- endif
- define Package/fastd/description
- Fast and secure tunneling daemon, which is optimized on small code size and few dependencies
- endef
- define Package/fastd/conffiles
- /etc/config/fastd
- endef
- define Package/fastd/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fastd $(1)/usr/bin/
- $(INSTALL_DIR) $(1)/etc/init.d/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.init $(1)/etc/init.d/fastd
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/examples/openwrt/fastd.config $(1)/etc/config/fastd
- $(INSTALL_DIR) $(1)/etc/fastd
- $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
- $(INSTALL_DATA) files/fastd.upgrade $(1)/lib/upgrade/keep.d/fastd
- endef
- $(eval $(call BuildPackage,fastd))
|