123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- #
- # Copyright (C) 2012-2014 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:=14
- PKG_RELEASE:=2
-
- PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
- PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/75
- PKG_MD5SUM:=34f6bdebd0410a1fba7c8fd06fff7a05
-
- PKG_LICENSE:=BSD-2-Clause
- PKG_LICENSE_FILE:=COPYRIGHT
-
- PKG_CONFIG_DEPENDS:=\
- CONFIG_FASTD_ENABLE_METHOD_CIPHER_TEST \
- CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC \
- CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC \
- CONFIG_FASTD_ENABLE_METHOD_GENERIC_POLY1305 \
- 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_WITH_CMDLINE_USER \
- CONFIG_FASTD_WITH_CMDLINE_LOGGING \
- CONFIG_FASTD_WITH_CMDLINE_OPERATION \
- CONFIG_FASTD_WITH_CMDLINE_COMMANDS \
- CONFIG_FASTD_WITH_VERIFY
-
-
- PKG_BUILD_DEPENDS:=nacl libuecc
-
- include $(INCLUDE_DIR)/package.mk
- include $(INCLUDE_DIR)/cmake.mk
-
- define Package/fastd
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=+kmod-tun +librt +libpthread
- TITLE:=Fast and Secure Tunneling Daemon
- URL:=https://projects.universe-factory.net/projects/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_GENERIC_GMAC:BOOL=FALSE \
- -DWITH_METHOD_GENERIC_POLY1305: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_CMDLINE_USER:BOOL=FALSE \
- -DWITH_CMDLINE_LOGGING:BOOL=FALSE \
- -DWITH_CMDLINE_OPERATION:BOOL=FALSE \
- -DWITH_CMDLINE_COMMANDS:BOOL=FALSE \
- -DWITH_VERIFY:BOOL=FALSE \
- -DWITH_CAPABILITIES:BOOL=FALSE \
- -DENABLE_SYSTEMD:BOOL=FALSE \
- -DENABLE_LIBSODIUM:BOOL=FALSE
-
-
- 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_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_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_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_VERIFY),y)
- CMAKE_OPTIONS += -DWITH_VERIFY: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) files/fastd.init $(1)/etc/init.d/fastd
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_CONF) files/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))
|