1 # SPDX-Identifier-License: GPL-2.0-only
3 # Copyright (C) 2005-2016 OpenWrt.org
6 include $(TOPDIR
)/rules.mk
11 PKG_BUILD_FLAGS
:=no-mips16
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
14 PKG_SOURCE_URL
:=https
://www.gnupg.org
/ftp
/gcrypt
/gnutls
/v3.8
15 PKG_HASH
:=0ea0d11a1660a1e63f960f157b197abe6d0c8cb3255be24e1fb3815930b9bdc5
17 PKG_MAINTAINER
:=Nikos Mavrogiannopoulos
<nmav@gnutls.org
>
18 PKG_LICENSE
:=LGPL-2.1
-or-later
19 PKG_LICENSE_FILES
:=LICENSE
20 PKG_CPE_ID
:=cpe
:/a
:gnu
:gnutls
22 PKG_BUILD_DEPENDS
:=gettext-full
/host
24 PKG_FIXUP
:=autoreconf gettext-version
26 PKG_LIBTOOL_PATHS
:=. lib
28 PKG_CONFIG_DEPENDS
:= \
31 CONFIG_GNUTLS_CRYPTODEV \
32 CONFIG_GNUTLS_DTLS_SRTP \
33 CONFIG_GNUTLS_EXT_LIBTASN1 \
34 CONFIG_GNUTLS_HEARTBEAT \
36 CONFIG_GNUTLS_PKCS11 \
40 CONFIG_LIBNETTLE_MINI \
41 CONFIG_PACKAGE_libgnutls-dane \
43 include $(INCLUDE_DIR
)/package.mk
46 define Package
/gnutls
/Default
51 URL
:=http
://www.gnutls.org
/
54 define Package
/gnutls
/Default
/description
55 GnuTLS is a secure communications library implementing the SSL
, TLS
56 and DTLS protocols and technologies around them. It provides a simple
57 C language application programming interface
(API
) to access the secure
58 communications protocols
as well
as APIs to parse and write X
.509, PKCS12
,
59 OpenPGP and other required structures. It is aimed to be portable and
60 efficient with focus on security and interoperability.
64 define Package
/certtool
65 $(call Package
/gnutls
/Default
)
69 TITLE
+= (certool utility
)
73 define Package
/certtool
/description
74 $(call Package
/gnutls
/Default
/description
)
75 This package contains the GnuTLS certtool utility.
79 define Package
/gnutls-utils
80 $(call Package
/gnutls
/Default
)
85 DEPENDS
+= +libgnutls
+PACKAGE_libgnutls-dane
:libgnutls-dane
88 define Package
/gnutls-utils
/description
89 $(call Package
/gnutls
/Default
/description
)
90 This package contains the GnuTLS gnutls-cli
, gnutls-serv
, psktool
,
91 and srptool utilities.
94 define Package
/libgnutls
/config
95 source
"$(SOURCE)/Config.in"
98 define Package
/libgnutls
99 $(call Package
/gnutls
/Default
)
101 DEPENDS
+= +libnettle
+!LIBNETTLE_MINI
:libgmp
+GNUTLS_EXT_LIBTASN1
:libtasn1
+GNUTLS_PKCS11
:p11-kit
+GNUTLS_CRYPTODEV
:kmod-cryptodev
+libatomic
104 define Package
/libgnutls-dane
105 $(call Package
/gnutls
/Default
)
106 TITLE
+= (libgnutls-dane library
)
107 DEPENDS
:= +libgnutls
+PACKAGE_libgnutls-dane
:libunbound
110 define Package
/libgnutls
/description
111 $(call Package
/gnutls
/Default
/description
)
112 This package contains the GnuTLS shared library
, needed by other programs.
115 # We disable the configuration file (system-priority-file) because
116 # the use of configuration increases the non-shared memory used by
117 # the library and we don't provide an openwrt-specific configuration
123 --disable-gcc-warnings \
126 --disable-seccomp-tests \
128 --disable-valgrind-tests \
129 --disable-ssl2-support \
130 --disable-ssl3-support \
131 --enable-local-libopts \
133 --with-default-trust-store-dir
=/etc
/ssl
/certs
/ \
134 --with-included-unistring \
135 --with-included-libunistring \
136 --with-librt-prefix
="$(LIBRT_ROOT_DIR)/" \
138 --with-system-priority-file
="" \
143 ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1
),y
)
144 CONFIGURE_ARGS
+= --with-included-libtasn1
147 ifneq ($(CONFIG_GNUTLS_PKCS11
),y
)
148 CONFIGURE_ARGS
+= --without-p11-kit
151 ifeq ($(CONFIG_LIBNETTLE_MINI
),y
)
152 CONFIGURE_ARGS
+= --with-nettle-mini
155 ifneq ($(CONFIG_GNUTLS_DTLS_SRTP
),y
)
156 CONFIGURE_ARGS
+= --disable-dtls-srtp-support
159 ifneq ($(CONFIG_GNUTLS_ALPN
),y
)
160 CONFIGURE_ARGS
+= --disable-alpn-support
163 ifneq ($(CONFIG_GNUTLS_HEARTBEAT
),y
)
164 CONFIGURE_ARGS
+= --disable-heartbeat-support
167 ifneq ($(CONFIG_GNUTLS_SRP
),y
)
168 CONFIGURE_ARGS
+= --disable-srp-authentication
171 ifneq ($(CONFIG_GNUTLS_PSK
),y
)
172 CONFIGURE_ARGS
+= --disable-psk-authentication
175 ifneq ($(CONFIG_GNUTLS_ANON
),y
)
176 CONFIGURE_ARGS
+= --disable-anon-authentication
179 ifneq ($(CONFIG_GNUTLS_OCSP
),y
)
180 CONFIGURE_ARGS
+= --disable-ocsp
183 ifneq ($(CONFIG_GNUTLS_TPM
),y
)
184 CONFIGURE_ARGS
+= --without-tpm
187 ifeq ($(CONFIG_GNUTLS_CRYPTODEV
),y
)
188 CONFIGURE_ARGS
+= --enable-cryptodev
191 ifeq ($(CONFIG_PACKAGE_libgnutls-dane
),)
192 CONFIGURE_ARGS
+= --disable-libdane
195 define Build
/InstallDev
196 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
198 $(PKG_INSTALL_DIR
)/usr
/lib
/*.so
* \
201 $(PKG_INSTALL_DIR
)/usr
/include/gnutls \
204 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc \
205 $(1)/usr
/lib
/pkgconfig
/
209 define Package
/certtool
/conffiles
210 /etc
/gnutls
/certtool.cfg
213 define Package
/certtool
/install
214 $(INSTALL_DIR
) $(1)/etc
/gnutls
215 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
216 $(INSTALL_DIR
) $(1)/usr
/bin
217 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
221 define Package
/gnutls-utils
/install
222 $(INSTALL_DIR
) $(1)/usr
/bin
223 ifeq ($(CONFIG_GNUTLS_OCSP
),y
)
224 ifeq ($(CONFIG_GNUTLS_ANON
),y
)
226 $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} \
230 $(PKG_INSTALL_DIR
)/usr
/bin
/ocsptool \
233 ifeq ($(CONFIG_GNUTLS_SRP
),y
)
235 $(PKG_INSTALL_DIR
)/usr
/bin
/srptool \
238 ifeq ($(CONFIG_GNUTLS_PSK
),y
)
240 $(PKG_INSTALL_DIR
)/usr
/bin
/psktool \
243 ifeq ($(CONFIG_GNUTLS_PKCS11
),y
)
245 $(PKG_INSTALL_DIR
)/usr
/bin
/p11tool \
248 ifeq ($(CONFIG_GNUTLS_TPM
),y
)
250 $(PKG_INSTALL_DIR
)/usr
/bin
/tpmtool \
256 define Package
/libgnutls
/install
257 $(INSTALL_DIR
) $(1)/usr
/lib
258 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
261 define Package
/libgnutls-dane
/install
262 $(INSTALL_DIR
) $(1)/usr
/lib
263 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-dane.so.
* $(1)/usr
/lib
/
267 $(eval
$(call BuildPackage
,certtool
))
268 $(eval
$(call BuildPackage
,gnutls-utils
))
269 $(eval
$(call BuildPackage
,libgnutls
))
270 $(eval
$(call BuildPackage
,libgnutls-dane
))