├── base └── mbedtls │ ├── Makefile │ └── patches │ └── 200-config.patch └── packages ├── c-ares └── Makefile ├── libev └── Makefile ├── libsodium └── Makefile └── pcre └── Makefile /base/mbedtls/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2011-2015 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | include $(TOPDIR)/rules.mk 9 | 10 | PKG_NAME:=mbedtls 11 | PKG_VERSION:=2.16.10 12 | PKG_RELEASE:=1 13 | PKG_USE_MIPS16:=0 14 | 15 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 16 | PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)? 17 | PKG_HASH:=96257bb03b30300b2f35f861ffe204ed957e9fd0329d80646fe57fc49f589b29 18 | 19 | PKG_LICENSE:=GPL-2.0-or-later 20 | PKG_LICENSE_FILES:=gpl-2.0.txt 21 | PKG_CPE_ID:=cpe:/a:arm:mbed_tls 22 | 23 | PKG_CONFIG_DEPENDS := \ 24 | CONFIG_LIBMBEDTLS_DEBUG_C \ 25 | CONFIG_LIBMBEDTLS_HKDF_C 26 | 27 | include $(INCLUDE_DIR)/package.mk 28 | include $(INCLUDE_DIR)/cmake.mk 29 | 30 | define Package/mbedtls/Default 31 | TITLE:=Embedded SSL 32 | URL:=https://tls.mbed.org 33 | endef 34 | 35 | define Package/mbedtls/Default/description 36 | The aim of the mbedtls project is to provide a quality, open-source 37 | cryptographic library written in C and targeted at embedded systems. 38 | endef 39 | 40 | define Package/libmbedtls 41 | $(call Package/mbedtls/Default) 42 | SECTION:=libs 43 | CATEGORY:=Libraries 44 | SUBMENU:=SSL 45 | TITLE+= (library) 46 | ABI_VERSION:=12 47 | endef 48 | 49 | define Package/libmbedtls/config 50 | config LIBMBEDTLS_DEBUG_C 51 | depends on PACKAGE_libmbedtls 52 | bool "Enable debug functions" 53 | default n 54 | help 55 | This option enables mbedtls library's debug functions. 56 | 57 | It increases the uncompressed libmbedtls binary size 58 | by around 60 KiB (for an ARMv5 platform). 59 | 60 | Usually, you don't need this, so don't select this if you're unsure. 61 | 62 | config LIBMBEDTLS_HKDF_C 63 | depends on PACKAGE_libmbedtls 64 | bool "Enable the HKDF algorithm (RFC 5869)" 65 | default n 66 | help 67 | This option adds support for the Hashed Message Authentication Code 68 | (HMAC)-based key derivation function (HKDF). 69 | endef 70 | 71 | define Package/mbedtls-util 72 | $(call Package/mbedtls/Default) 73 | SECTION:=utils 74 | CATEGORY:=Utilities 75 | TITLE+= (utilities) 76 | DEPENDS:=+libmbedtls 77 | endef 78 | 79 | define Package/libmbedtls/description 80 | $(call Package/mbedtls/Default/description) 81 | This package contains the mbedtls library. 82 | endef 83 | 84 | define Package/mbedtls-util/description 85 | $(call Package/mbedtls/Default/description) 86 | This package contains mbedtls helper programs for private key and 87 | CSR generation (gen_key, cert_req) 88 | endef 89 | 90 | PKG_INSTALL:=1 91 | 92 | TARGET_CFLAGS += -ffunction-sections -fdata-sections 93 | TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) 94 | 95 | CMAKE_OPTIONS += \ 96 | -DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \ 97 | -DENABLE_TESTING:Bool=OFF \ 98 | -DENABLE_PROGRAMS:Bool=ON 99 | 100 | define Build/Configure 101 | $(Build/Configure/Default) 102 | 103 | awk 'BEGIN { rc = 1 } \ 104 | /#define MBEDTLS_DEBUG_C/ { $$$$0 = "$(if $(CONFIG_LIBMBEDTLS_DEBUG_C),,// )#define MBEDTLS_DEBUG_C"; rc = 0 } \ 105 | { print } \ 106 | END { exit(rc) }' $(PKG_BUILD_DIR)/include/mbedtls/config.h \ 107 | >$(PKG_BUILD_DIR)/include/mbedtls/config.h.new && \ 108 | mv $(PKG_BUILD_DIR)/include/mbedtls/config.h.new $(PKG_BUILD_DIR)/include/mbedtls/config.h 109 | 110 | awk 'BEGIN { rc = 1 } \ 111 | /#define MBEDTLS_HKDF_C/ { $$$$0 = "$(if $(CONFIG_LIBMBEDTLS_HKDF_C),,// )#define MBEDTLS_HKDF_C"; rc = 0 } \ 112 | { print } \ 113 | END { exit(rc) }' $(PKG_BUILD_DIR)/include/mbedtls/config.h \ 114 | >$(PKG_BUILD_DIR)/include/mbedtls/config.h.new && \ 115 | mv $(PKG_BUILD_DIR)/include/mbedtls/config.h.new $(PKG_BUILD_DIR)/include/mbedtls/config.h 116 | endef 117 | 118 | define Build/InstallDev 119 | $(INSTALL_DIR) $(1)/usr/include 120 | $(CP) $(PKG_INSTALL_DIR)/usr/include/mbedtls $(1)/usr/include/ 121 | $(INSTALL_DIR) $(1)/usr/lib 122 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/ 123 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/ 124 | endef 125 | 126 | define Package/libmbedtls/install 127 | $(INSTALL_DIR) $(1)/usr/lib 128 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/ 129 | endef 130 | 131 | define Package/mbedtls-util/install 132 | $(INSTALL_DIR) $(1)/usr/bin 133 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gen_key $(1)/usr/bin/ 134 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cert_req $(1)/usr/bin/ 135 | endef 136 | 137 | $(eval $(call BuildPackage,libmbedtls)) 138 | $(eval $(call BuildPackage,mbedtls-util)) 139 | -------------------------------------------------------------------------------- /base/mbedtls/patches/200-config.patch: -------------------------------------------------------------------------------- 1 | --- a/include/mbedtls/config.h 2 | +++ b/include/mbedtls/config.h 3 | @@ -692,14 +692,14 @@ 4 | * 5 | * Enable Output Feedback mode (OFB) for symmetric ciphers. 6 | */ 7 | -#define MBEDTLS_CIPHER_MODE_OFB 8 | +//#define MBEDTLS_CIPHER_MODE_OFB 9 | 10 | /** 11 | * \def MBEDTLS_CIPHER_MODE_XTS 12 | * 13 | * Enable Xor-encrypt-xor with ciphertext stealing mode (XTS) for AES. 14 | */ 15 | -#define MBEDTLS_CIPHER_MODE_XTS 16 | +//#define MBEDTLS_CIPHER_MODE_XTS 17 | 18 | /** 19 | * \def MBEDTLS_CIPHER_NULL_CIPHER 20 | @@ -816,19 +816,19 @@ 21 | * 22 | * Comment macros to disable the curve and functions for it 23 | */ 24 | -#define MBEDTLS_ECP_DP_SECP192R1_ENABLED 25 | -#define MBEDTLS_ECP_DP_SECP224R1_ENABLED 26 | +//#define MBEDTLS_ECP_DP_SECP192R1_ENABLED 27 | +//#define MBEDTLS_ECP_DP_SECP224R1_ENABLED 28 | #define MBEDTLS_ECP_DP_SECP256R1_ENABLED 29 | #define MBEDTLS_ECP_DP_SECP384R1_ENABLED 30 | -#define MBEDTLS_ECP_DP_SECP521R1_ENABLED 31 | -#define MBEDTLS_ECP_DP_SECP192K1_ENABLED 32 | -#define MBEDTLS_ECP_DP_SECP224K1_ENABLED 33 | +//#define MBEDTLS_ECP_DP_SECP521R1_ENABLED 34 | +//#define MBEDTLS_ECP_DP_SECP192K1_ENABLED 35 | +//#define MBEDTLS_ECP_DP_SECP224K1_ENABLED 36 | #define MBEDTLS_ECP_DP_SECP256K1_ENABLED 37 | -#define MBEDTLS_ECP_DP_BP256R1_ENABLED 38 | -#define MBEDTLS_ECP_DP_BP384R1_ENABLED 39 | -#define MBEDTLS_ECP_DP_BP512R1_ENABLED 40 | +//#define MBEDTLS_ECP_DP_BP256R1_ENABLED 41 | +//#define MBEDTLS_ECP_DP_BP384R1_ENABLED 42 | +//#define MBEDTLS_ECP_DP_BP512R1_ENABLED 43 | #define MBEDTLS_ECP_DP_CURVE25519_ENABLED 44 | -#define MBEDTLS_ECP_DP_CURVE448_ENABLED 45 | +//#define MBEDTLS_ECP_DP_CURVE448_ENABLED 46 | 47 | /** 48 | * \def MBEDTLS_ECP_NIST_OPTIM 49 | @@ -952,7 +952,7 @@ 50 | * See dhm.h for more details. 51 | * 52 | */ 53 | -#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED 54 | +//#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED 55 | 56 | /** 57 | * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED 58 | @@ -972,7 +972,7 @@ 59 | * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 60 | * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA 61 | */ 62 | -#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED 63 | +//#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED 64 | 65 | /** 66 | * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED 67 | @@ -997,7 +997,7 @@ 68 | * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA 69 | * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA 70 | */ 71 | -#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED 72 | +//#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED 73 | 74 | /** 75 | * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED 76 | @@ -1131,7 +1131,7 @@ 77 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 78 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 79 | */ 80 | -#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED 81 | +//#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED 82 | 83 | /** 84 | * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED 85 | @@ -1155,7 +1155,7 @@ 86 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 87 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 88 | */ 89 | -#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED 90 | +//#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED 91 | 92 | /** 93 | * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED 94 | @@ -1259,7 +1259,7 @@ 95 | * This option is only useful if both MBEDTLS_SHA256_C and 96 | * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used. 97 | */ 98 | -//#define MBEDTLS_ENTROPY_FORCE_SHA256 99 | +#define MBEDTLS_ENTROPY_FORCE_SHA256 100 | 101 | /** 102 | * \def MBEDTLS_ENTROPY_NV_SEED 103 | @@ -1354,14 +1354,14 @@ 104 | * Uncomment this macro to disable the use of CRT in RSA. 105 | * 106 | */ 107 | -//#define MBEDTLS_RSA_NO_CRT 108 | +#define MBEDTLS_RSA_NO_CRT 109 | 110 | /** 111 | * \def MBEDTLS_SELF_TEST 112 | * 113 | * Enable the checkup functions (*_self_test). 114 | */ 115 | -#define MBEDTLS_SELF_TEST 116 | +//#define MBEDTLS_SELF_TEST 117 | 118 | /** 119 | * \def MBEDTLS_SHA256_SMALLER 120 | @@ -1515,7 +1515,7 @@ 121 | * configuration of this extension). 122 | * 123 | */ 124 | -#define MBEDTLS_SSL_RENEGOTIATION 125 | +//#define MBEDTLS_SSL_RENEGOTIATION 126 | 127 | /** 128 | * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO 129 | @@ -1690,7 +1690,7 @@ 130 | * 131 | * Comment this macro to disable support for SSL session tickets 132 | */ 133 | -#define MBEDTLS_SSL_SESSION_TICKETS 134 | +//#define MBEDTLS_SSL_SESSION_TICKETS 135 | 136 | /** 137 | * \def MBEDTLS_SSL_EXPORT_KEYS 138 | @@ -1720,7 +1720,7 @@ 139 | * 140 | * Comment this macro to disable support for truncated HMAC in SSL 141 | */ 142 | -#define MBEDTLS_SSL_TRUNCATED_HMAC 143 | +//#define MBEDTLS_SSL_TRUNCATED_HMAC 144 | 145 | /** 146 | * \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT 147 | @@ -1796,7 +1796,7 @@ 148 | * 149 | * Comment this to disable run-time checking and save ROM space 150 | */ 151 | -#define MBEDTLS_VERSION_FEATURES 152 | +//#define MBEDTLS_VERSION_FEATURES 153 | 154 | /** 155 | * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 156 | @@ -2126,7 +2126,7 @@ 157 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 158 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 159 | */ 160 | -#define MBEDTLS_CAMELLIA_C 161 | +//#define MBEDTLS_CAMELLIA_C 162 | 163 | /** 164 | * \def MBEDTLS_ARIA_C 165 | @@ -2192,7 +2192,7 @@ 166 | * This module enables the AES-CCM ciphersuites, if other requisites are 167 | * enabled as well. 168 | */ 169 | -#define MBEDTLS_CCM_C 170 | +//#define MBEDTLS_CCM_C 171 | 172 | /** 173 | * \def MBEDTLS_CERTS_C 174 | @@ -2204,7 +2204,7 @@ 175 | * 176 | * This module is used for testing (ssl_client/server). 177 | */ 178 | -#define MBEDTLS_CERTS_C 179 | +//#define MBEDTLS_CERTS_C 180 | 181 | /** 182 | * \def MBEDTLS_CHACHA20_C 183 | @@ -2312,7 +2312,7 @@ 184 | * \warning DES is considered a weak cipher and its use constitutes a 185 | * security risk. We recommend considering stronger ciphers instead. 186 | */ 187 | -#define MBEDTLS_DES_C 188 | +//#define MBEDTLS_DES_C 189 | 190 | /** 191 | * \def MBEDTLS_DHM_C 192 | @@ -2475,7 +2475,7 @@ 193 | * This module adds support for the Hashed Message Authentication Code 194 | * (HMAC)-based key derivation function (HKDF). 195 | */ 196 | -#define MBEDTLS_HKDF_C 197 | +//#define MBEDTLS_HKDF_C 198 | 199 | /** 200 | * \def MBEDTLS_HMAC_DRBG_C 201 | @@ -2785,7 +2785,7 @@ 202 | * 203 | * This module enables abstraction of common (libc) functions. 204 | */ 205 | -#define MBEDTLS_PLATFORM_C 206 | +//#define MBEDTLS_PLATFORM_C 207 | 208 | /** 209 | * \def MBEDTLS_POLY1305_C 210 | @@ -2806,7 +2806,7 @@ 211 | * Caller: library/md.c 212 | * 213 | */ 214 | -#define MBEDTLS_RIPEMD160_C 215 | +//#define MBEDTLS_RIPEMD160_C 216 | 217 | /** 218 | * \def MBEDTLS_RSA_C 219 | @@ -2913,7 +2913,7 @@ 220 | * 221 | * Requires: MBEDTLS_CIPHER_C 222 | */ 223 | -#define MBEDTLS_SSL_TICKET_C 224 | +//#define MBEDTLS_SSL_TICKET_C 225 | 226 | /** 227 | * \def MBEDTLS_SSL_CLI_C 228 | @@ -3013,7 +3013,7 @@ 229 | * 230 | * This module provides run-time version information. 231 | */ 232 | -#define MBEDTLS_VERSION_C 233 | +//#define MBEDTLS_VERSION_C 234 | 235 | /** 236 | * \def MBEDTLS_X509_USE_C 237 | @@ -3123,7 +3123,7 @@ 238 | * Module: library/xtea.c 239 | * Caller: 240 | */ 241 | -#define MBEDTLS_XTEA_C 242 | +//#define MBEDTLS_XTEA_C 243 | 244 | /* \} name SECTION: mbed TLS modules */ 245 | 246 | -------------------------------------------------------------------------------- /packages/c-ares/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009-2010 OpenWrt.org 3 | # Copyright (C) 2009 Jakob Pfeiffer 4 | # 5 | # This is free software, licensed under the GNU General Public License v2. 6 | # See /LICENSE for more information. 7 | # 8 | 9 | include $(TOPDIR)/rules.mk 10 | 11 | PKG_NAME:=c-ares 12 | PKG_VERSION:=1.17.1 13 | PKG_RELEASE:=5 14 | PKG_LICENSE:=MIT 15 | PKG_CPE_ID:=cpe:/a:c-ares_project:c-ares 16 | 17 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 18 | PKG_SOURCE_URL:=https://c-ares.haxx.se/download/ 19 | PKG_HASH:=d73dd0f6de824afd407ce10750ea081af47eba52b8a6cb307d220131ad93fc40 20 | 21 | PKG_FIXUP:=autoreconf 22 | PKG_INSTALL:=1 23 | PKG_USE_MIPS16:=0 24 | 25 | include $(INCLUDE_DIR)/package.mk 26 | 27 | TARGET_CPPFLAGS += $(filter -D%,$(TARGET_CFLAGS)) 28 | TARGET_CFLAGS := $(filter-out -D%,$(TARGET_CFLAGS)) 29 | 30 | define Package/libcares 31 | SECTION:=libs 32 | CATEGORY:=Libraries 33 | TITLE:=Library for asyncronous DNS Requests (including name resolves) 34 | URL:=http://c-ares.haxx.se/ 35 | MAINTAINER:=Karl Palsson 36 | endef 37 | 38 | define Package/libcares/description 39 | c-ares is a C library for asynchronous DNS requests (including name resolves) 40 | 41 | C89 compatibility, MIT licensed, builds for and runs on POSIX, Windows, 42 | Netware, Android and many more operating systems. 43 | 44 | endef 45 | 46 | define Package/libcares/install 47 | $(INSTALL_DIR) $(1)/usr/lib 48 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/ 49 | endef 50 | 51 | define Build/InstallDev 52 | $(INSTALL_DIR) $(1) 53 | $(CP) $(PKG_INSTALL_DIR)/* $(1)/ 54 | endef 55 | 56 | $(eval $(call BuildPackage,libcares)) 57 | -------------------------------------------------------------------------------- /packages/libev/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014-2015 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | include $(TOPDIR)/rules.mk 9 | 10 | PKG_NAME:=libev 11 | PKG_VERSION:=4.33 12 | PKG_RELEASE:=2 13 | 14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 15 | PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/ 16 | PKG_HASH:=507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea 17 | PKG_LICENSE:=BSD-2-Clause 18 | PKG_MAINTAINER:=Karl Palsson 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | PKG_FIXUP:=autoreconf 22 | PKG_INSTALL:=1 23 | PKG_USE_MIPS16:=0 24 | 25 | include $(INCLUDE_DIR)/package.mk 26 | 27 | define Package/libev 28 | SECTION:=libs 29 | CATEGORY:=Libraries 30 | TITLE:=High-performance event loop 31 | URL:=http://software.schmorp.de/pkg/libev.html 32 | endef 33 | 34 | define Package/libev/description 35 | A full-featured and high-performance event loop that is loosely modelled after 36 | libevent, but without its limitations and bugs. 37 | endef 38 | 39 | TARGET_CFLAGS += $(FPIC) 40 | 41 | CONFIGURE_ARGS += \ 42 | --enable-shared \ 43 | --enable-static \ 44 | 45 | define Build/InstallDev 46 | $(INSTALL_DIR) $(1)/usr/include 47 | $(CP) $(PKG_INSTALL_DIR)/usr/include/event.h $(1)/usr/include/ev_event_compat.h 48 | $(CP) $(PKG_INSTALL_DIR)/usr/include/ev.h $(1)/usr/include/ 49 | $(CP) $(PKG_INSTALL_DIR)/usr/include/ev++.h $(1)/usr/include/ 50 | $(INSTALL_DIR) $(1)/usr/lib 51 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.{a,so*} $(1)/usr/lib/ 52 | endef 53 | 54 | define Package/libev/install 55 | $(INSTALL_DIR) $(1)/usr/lib 56 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.so* $(1)/usr/lib/ 57 | endef 58 | 59 | $(eval $(call BuildPackage,libev)) 60 | -------------------------------------------------------------------------------- /packages/libsodium/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009-2016 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | include $(TOPDIR)/rules.mk 9 | 10 | PKG_NAME:=libsodium 11 | PKG_VERSION:=1.0.18 12 | PKG_RELEASE:=1 13 | 14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 15 | PKG_SOURCE_URL:=https://download.libsodium.org/libsodium/releases/ 16 | PKG_HASH:=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1 17 | 18 | PKG_FIXUP:=libtool autoreconf 19 | PKG_USE_MIPS16:=0 20 | PKG_INSTALL:=1 21 | 22 | PKG_MAINTAINER:=Damiano Renfer 23 | PKG_LICENSE:=ISC 24 | 25 | include $(INCLUDE_DIR)/package.mk 26 | 27 | define Package/libsodium 28 | SECTION:=libs 29 | CATEGORY:=Libraries 30 | TITLE:=P(ortable|ackageable) NaCl-based crypto library 31 | URL:=https://github.com/jedisct1/libsodium 32 | MAINTAINER:=Damiano Renfer 33 | DEPENDS:=+libpthread 34 | endef 35 | 36 | define Package/libsodium/description 37 | NaCl (pronounced "salt") is a new easy-to-use high-speed software library for network communication, encryption, decryption, signatures, etc. 38 | NaCl's goal is to provide all of the core operations needed to build higher-level cryptographic tools. 39 | Sodium is a portable, cross-compilable, installable, packageable fork of NaCl (based on the latest released upstream version nacl-20110221), with a compatible API. 40 | The design choices, particularly in regard to the Curve25519 Diffie-Hellman function, emphasize security (whereas NIST curves emphasize "performance" at the cost of security), and "magic constants" in NaCl/Sodium have clear rationales. 41 | The same cannot be said of NIST curves, where the specific origins of certain constants are not described by the standards. 42 | And despite the emphasis on higher security, primitives are faster across-the-board than most implementations of the NIST standards. 43 | endef 44 | 45 | define Package/libsodium/config 46 | menu "Configuration" 47 | depends on PACKAGE_libsodium 48 | config LIBSODIUM_MINIMAL 49 | bool "Compile only what is required for the high-level API (no aes128ctr), should be fine in most cases." 50 | default y 51 | endmenu 52 | endef 53 | 54 | CONFIGURE_ARGS+= \ 55 | --disable-ssp \ 56 | $(if $(CONFIG_LIBSODIUM_MINIMAL),--enable-minimal=yes,--enable-minimal=no) 57 | 58 | define Build/InstallDev 59 | $(INSTALL_DIR) $(1)/usr/include/sodium 60 | $(CP) $(PKG_INSTALL_DIR)/usr/include/sodium.h $(1)/usr/include 61 | $(CP) $(PKG_INSTALL_DIR)/usr/include/sodium/*.h $(1)/usr/include/sodium 62 | $(INSTALL_DIR) $(1)/usr/lib 63 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsodium.{a,so*} $(1)/usr/lib 64 | $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 65 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsodium.pc $(1)/usr/lib/pkgconfig/ 66 | endef 67 | 68 | define Package/libsodium/install 69 | $(INSTALL_DIR) $(1)/usr/lib 70 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsodium.so.* $(1)/usr/lib/ 71 | endef 72 | 73 | $(eval $(call BuildPackage,libsodium)) 74 | -------------------------------------------------------------------------------- /packages/pcre/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2006-2015 OpenWrt.org 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | include $(TOPDIR)/rules.mk 9 | 10 | PKG_NAME:=pcre 11 | PKG_VERSION:=8.45 12 | PKG_RELEASE:=2 13 | 14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 15 | PKG_SOURCE_URL:=@SF/$(PKG_NAME) 16 | PKG_HASH:=4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09 17 | PKG_MAINTAINER:=Thomas Heil 18 | 19 | PKG_LICENSE:=BSD-3-Clause 20 | PKG_LICENSE_FILES:=LICENCE 21 | 22 | PKG_FIXUP:=autoreconf 23 | PKG_USE_MIPS16:=0 24 | PKG_INSTALL:=1 25 | 26 | include $(INCLUDE_DIR)/package.mk 27 | 28 | define Package/libpcre/default 29 | SECTION:=libs 30 | CATEGORY:=Libraries 31 | URL:=http://www.pcre.org/ 32 | endef 33 | 34 | define Package/libpcre 35 | $(call Package/libpcre/default) 36 | TITLE:=A Perl Compatible Regular Expression library 37 | endef 38 | 39 | TARGET_CFLAGS += $(FPIC) 40 | 41 | CONFIGURE_ARGS += \ 42 | --enable-utf8 \ 43 | --enable-unicode-properties \ 44 | --enable-pcre16 \ 45 | --with-match-limit-recursion=16000 \ 46 | 47 | ifneq ($(CONFIG_PACKAGE_libpcrecpp),) 48 | CONFIGURE_ARGS+= --enable-cpp 49 | else 50 | CONFIGURE_ARGS+= --disable-cpp 51 | endif 52 | 53 | MAKE_FLAGS += \ 54 | CFLAGS="$(TARGET_CFLAGS)" 55 | 56 | define Build/InstallDev 57 | $(INSTALL_DIR) $(1)/usr/bin 58 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/ 59 | 60 | $(INSTALL_DIR) $(2)/bin 61 | $(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin 62 | 63 | $(INSTALL_DIR) $(1)/usr/include 64 | $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/ 65 | 66 | $(INSTALL_DIR) $(1)/usr/lib 67 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/ 68 | 69 | $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 70 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/ 71 | endef 72 | 73 | define Package/libpcre/install 74 | $(INSTALL_DIR) $(1)/usr/lib 75 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/ 76 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/ 77 | endef 78 | 79 | $(eval $(call BuildPackage,libpcre)) 80 | --------------------------------------------------------------------------------