2 # Copyright (C) 2005-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
16 PKG_SOURCE_URL
:=ftp
://ftp.gnutls.org
/gcrypt
/gnutls
/v3.5
17 PKG_MD5SUM
:=7a38b23757aae009c3eb5bb12fb0afda
18 #PKG_FIXUP:=autoreconf gettext-version
19 PKG_MAINTAINER
:=Nikos Mavrogiannopoulos
<nmav@gnutls.org
>
20 PKG_LICENSE
:=LGPLv2.1
+
23 PKG_LIBTOOL_PATHS
:=. lib
24 PKG_CHECK_FORMAT_SECURITY
:=0
26 PKG_CONFIG_DEPENDS
:= \
29 CONFIG_GNUTLS_CRYPTODEV \
30 CONFIG_GNUTLS_DTLS_SRTP \
31 CONFIG_GNUTLS_EXT_LIBTASN1 \
32 CONFIG_GNUTLS_HEARTBEAT \
34 CONFIG_GNUTLS_OPENPGP \
35 CONFIG_GNUTLS_PKCS11 \
39 CONFIG_LIBNETTLE_MINI \
41 include $(INCLUDE_DIR
)/package.mk
44 define Package
/gnutls
/Default
49 URL
:=http
://www.gnutls.org
/
52 define Package
/gnutls
/Default
/description
53 GnuTLS is a secure communications library implementing the SSL
, TLS
54 and DTLS protocols and technologies around them. It provides a simple
55 C language application programming interface
(API
) to access the secure
56 communications protocols
as well
as APIs to parse and write X
.509, PKCS12
,
57 OpenPGP and other required structures. It is aimed to be portable and
58 efficient with focus on security and interoperability.
62 define Package
/certtool
63 $(call Package
/gnutls
/Default
)
67 TITLE
+= (certool utility
)
71 define Package
/certtool
/description
72 $(call Package
/gnutls
/Default
/description
)
73 This package contains the GnuTLS certtool utility.
77 define Package
/gnutls-utils
78 $(call Package
/gnutls
/Default
)
86 define Package
/gnutls-utils
/description
87 $(call Package
/gnutls
/Default
/description
)
88 This package contains the GnuTLS gnutls-cli
, gnutls-serv
, psktool
,
89 and srptool utilities.
92 define Package
/libgnutls
/config
93 source
"$(SOURCE)/Config.in"
96 define Package
/libgnutls
97 $(call Package
/gnutls
/Default
)
99 DEPENDS
+= +libnettle
+!LIBNETTLE_MINI
:libgmp
+GNUTLS_EXT_LIBTASN1
:libtasn1
+GNUTLS_PKCS11
:p11-kit
+GNUTLS_CRYPTODEV
:kmod-cryptodev
102 define Package
/libgnutls
/description
103 $(call Package
/gnutls
/Default
/description
)
104 This package contains the GnuTLS shared library
, needed by other programs.
116 --enable-local-libopts \
119 --with-default-trust-store-dir
=/etc
/ssl
/certs
/ \
121 --with-librt-prefix
="$(LIBRT_ROOT_DIR)/"
123 ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1
),y
)
124 CONFIGURE_ARGS
+= --with-included-libtasn1
127 ifneq ($(CONFIG_GNUTLS_PKCS11
),y
)
128 CONFIGURE_ARGS
+= --without-p11-kit
131 ifeq ($(CONFIG_LIBNETTLE_MINI
),y
)
132 CONFIGURE_ARGS
+= --with-nettle-mini
135 ifneq ($(CONFIG_GNUTLS_DTLS_SRTP
),y
)
136 CONFIGURE_ARGS
+= --disable-dtls-srtp-support
139 ifneq ($(CONFIG_GNUTLS_ALPN
),y
)
140 CONFIGURE_ARGS
+= --disable-alpn-support
143 ifneq ($(CONFIG_GNUTLS_HEARTBEAT
),y
)
144 CONFIGURE_ARGS
+= --disable-heartbeat-support
147 ifneq ($(CONFIG_GNUTLS_SRP
),y
)
148 CONFIGURE_ARGS
+= --disable-srp-authentication
151 ifneq ($(CONFIG_GNUTLS_PSK
),y
)
152 CONFIGURE_ARGS
+= --disable-psk-authentication
155 ifneq ($(CONFIG_GNUTLS_OPENPGP
),y
)
156 CONFIGURE_ARGS
+= --disable-openpgp-authentication
159 ifneq ($(CONFIG_GNUTLS_ANON
),y
)
160 CONFIGURE_ARGS
+= --disable-anon-authentication
163 ifneq ($(CONFIG_GNUTLS_OCSP
),y
)
164 CONFIGURE_ARGS
+= --disable-ocsp
167 ifneq ($(CONFIG_GNUTLS_TPM
),y
)
168 CONFIGURE_ARGS
+= --without-tpm
171 ifeq ($(CONFIG_GNUTLS_CRYPTODEV
),y
)
172 CONFIGURE_ARGS
+= --enable-cryptodev
175 TARGET_CFLAGS
+= $(FPIC
)
177 define Build
/InstallDev
178 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
180 $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so
* \
183 $(PKG_INSTALL_DIR
)/usr
/include/gnutls \
186 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/gnutls.
pc \
187 $(1)/usr
/lib
/pkgconfig
/
191 define Package
/certtool
/conffiles
192 /etc
/gnutls
/certtool.cfg
195 define Package
/certtool
/install
196 $(INSTALL_DIR
) $(1)/etc
/gnutls
197 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
198 $(INSTALL_DIR
) $(1)/usr
/bin
199 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
203 define Package
/gnutls-utils
/install
204 $(INSTALL_DIR
) $(1)/usr
/bin
205 ifeq ($(CONFIG_GNUTLS_OCSP
),y
)
206 ifeq ($(CONFIG_GNUTLS_ANON
),y
)
208 $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} \
212 $(PKG_INSTALL_DIR
)/usr
/bin
/ocsptool \
215 ifeq ($(CONFIG_GNUTLS_SRP
),y
)
217 $(PKG_INSTALL_DIR
)/usr
/bin
/srptool \
220 ifeq ($(CONFIG_GNUTLS_PSK
),y
)
222 $(PKG_INSTALL_DIR
)/usr
/bin
/psktool \
225 ifeq ($(CONFIG_GNUTLS_PKCS11
),y
)
227 $(PKG_INSTALL_DIR
)/usr
/bin
/p11tool \
230 ifeq ($(CONFIG_GNUTLS_TPM
),y
)
232 $(PKG_INSTALL_DIR
)/usr
/bin
/tpmtool \
238 define Package
/libgnutls
/install
239 $(INSTALL_DIR
) $(1)/usr
/lib
240 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
244 $(eval
$(call BuildPackage
,certtool
))
245 $(eval
$(call BuildPackage
,gnutls-utils
))
246 $(eval
$(call BuildPackage
,libgnutls
))