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
:=c17e20d0f6b040580df57f5f94e3610f
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
)
66 TITLE
+= (certool utility
)
70 define Package
/certtool
/description
71 $(call Package
/gnutls
/Default
/description
)
72 This package contains the GnuTLS certtool utility.
76 define Package
/gnutls-utils
77 $(call Package
/gnutls
/Default
)
84 define Package
/gnutls-utils
/description
85 $(call Package
/gnutls
/Default
/description
)
86 This package contains the GnuTLS gnutls-cli
, gnutls-serv
, psktool
,
87 and srptool utilities.
90 define Package
/libgnutls
/config
91 source
"$(SOURCE)/Config.in"
94 define Package
/libgnutls
95 $(call Package
/gnutls
/Default
)
97 DEPENDS
+= +libnettle
+!LIBNETTLE_MINI
:libgmp
+GNUTLS_EXT_LIBTASN1
:libtasn1
+GNUTLS_PKCS11
:p11-kit
+GNUTLS_CRYPTODEV
:kmod-cryptodev
100 define Package
/libgnutls
/description
101 $(call Package
/gnutls
/Default
/description
)
102 This package contains the GnuTLS shared library
, needed by other programs.
114 --enable-local-libopts \
117 --with-default-trust-store-dir
=/etc
/ssl
/certs
/ \
119 --with-librt-prefix
="$(LIBRT_ROOT_DIR)/"
121 ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1
),y
)
122 CONFIGURE_ARGS
+= --with-included-libtasn1
125 ifneq ($(CONFIG_GNUTLS_PKCS11
),y
)
126 CONFIGURE_ARGS
+= --without-p11-kit
129 ifeq ($(CONFIG_LIBNETTLE_MINI
),y
)
130 CONFIGURE_ARGS
+= --with-nettle-mini
133 ifneq ($(CONFIG_GNUTLS_DTLS_SRTP
),y
)
134 CONFIGURE_ARGS
+= --disable-dtls-srtp-support
137 ifneq ($(CONFIG_GNUTLS_ALPN
),y
)
138 CONFIGURE_ARGS
+= --disable-alpn-support
141 ifneq ($(CONFIG_GNUTLS_HEARTBEAT
),y
)
142 CONFIGURE_ARGS
+= --disable-heartbeat-support
145 ifneq ($(CONFIG_GNUTLS_SRP
),y
)
146 CONFIGURE_ARGS
+= --disable-srp-authentication
149 ifneq ($(CONFIG_GNUTLS_PSK
),y
)
150 CONFIGURE_ARGS
+= --disable-psk-authentication
153 ifneq ($(CONFIG_GNUTLS_OPENPGP
),y
)
154 CONFIGURE_ARGS
+= --disable-openpgp-authentication
157 ifneq ($(CONFIG_GNUTLS_ANON
),y
)
158 CONFIGURE_ARGS
+= --disable-anon-authentication
161 ifneq ($(CONFIG_GNUTLS_OCSP
),y
)
162 CONFIGURE_ARGS
+= --disable-ocsp
165 ifneq ($(CONFIG_GNUTLS_TPM
),y
)
166 CONFIGURE_ARGS
+= --without-tpm
169 ifeq ($(CONFIG_GNUTLS_CRYPTODEV
),y
)
170 CONFIGURE_ARGS
+= --enable-cryptodev
173 TARGET_CFLAGS
+= $(FPIC
)
175 define Build
/InstallDev
176 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
178 $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so
* \
181 $(PKG_INSTALL_DIR
)/usr
/include/gnutls \
184 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/gnutls.
pc \
185 $(1)/usr
/lib
/pkgconfig
/
189 define Package
/certtool
/conffiles
190 /etc
/gnutls
/certtool.cfg
193 define Package
/certtool
/install
194 $(INSTALL_DIR
) $(1)/etc
/gnutls
195 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
196 $(INSTALL_DIR
) $(1)/usr
/bin
197 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
201 define Package
/gnutls-utils
/install
202 $(INSTALL_DIR
) $(1)/usr
/bin
203 ifeq ($(CONFIG_GNUTLS_OCSP
),y
)
204 ifeq ($(CONFIG_GNUTLS_ANON
),y
)
206 $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} \
210 $(PKG_INSTALL_DIR
)/usr
/bin
/ocsptool \
213 ifeq ($(CONFIG_GNUTLS_SRP
),y
)
215 $(PKG_INSTALL_DIR
)/usr
/bin
/srptool \
218 ifeq ($(CONFIG_GNUTLS_PSK
),y
)
220 $(PKG_INSTALL_DIR
)/usr
/bin
/psktool \
223 ifeq ($(CONFIG_GNUTLS_PKCS11
),y
)
225 $(PKG_INSTALL_DIR
)/usr
/bin
/p11tool \
228 ifeq ($(CONFIG_GNUTLS_TPM
),y
)
230 $(PKG_INSTALL_DIR
)/usr
/bin
/tpmtool \
236 define Package
/libgnutls
/install
237 $(INSTALL_DIR
) $(1)/usr
/lib
238 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
242 $(eval
$(call BuildPackage
,certtool
))
243 $(eval
$(call BuildPackage
,gnutls-utils
))
244 $(eval
$(call BuildPackage
,libgnutls
))