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
:=113e892e51acdb11b81804cd355adfee
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.
113 --with-included-unistring \
117 --enable-local-libopts \
120 --with-default-trust-store-dir
=/etc
/ssl
/certs
/ \
122 --with-librt-prefix
="$(LIBRT_ROOT_DIR)/"
124 ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1
),y
)
125 CONFIGURE_ARGS
+= --with-included-libtasn1
128 ifneq ($(CONFIG_GNUTLS_PKCS11
),y
)
129 CONFIGURE_ARGS
+= --without-p11-kit
132 ifeq ($(CONFIG_LIBNETTLE_MINI
),y
)
133 CONFIGURE_ARGS
+= --with-nettle-mini
136 ifneq ($(CONFIG_GNUTLS_DTLS_SRTP
),y
)
137 CONFIGURE_ARGS
+= --disable-dtls-srtp-support
140 ifneq ($(CONFIG_GNUTLS_ALPN
),y
)
141 CONFIGURE_ARGS
+= --disable-alpn-support
144 ifneq ($(CONFIG_GNUTLS_HEARTBEAT
),y
)
145 CONFIGURE_ARGS
+= --disable-heartbeat-support
148 ifneq ($(CONFIG_GNUTLS_SRP
),y
)
149 CONFIGURE_ARGS
+= --disable-srp-authentication
152 ifneq ($(CONFIG_GNUTLS_PSK
),y
)
153 CONFIGURE_ARGS
+= --disable-psk-authentication
156 ifneq ($(CONFIG_GNUTLS_OPENPGP
),y
)
157 CONFIGURE_ARGS
+= --disable-openpgp-authentication
160 ifneq ($(CONFIG_GNUTLS_ANON
),y
)
161 CONFIGURE_ARGS
+= --disable-anon-authentication
164 ifneq ($(CONFIG_GNUTLS_OCSP
),y
)
165 CONFIGURE_ARGS
+= --disable-ocsp
168 ifneq ($(CONFIG_GNUTLS_TPM
),y
)
169 CONFIGURE_ARGS
+= --without-tpm
172 ifeq ($(CONFIG_GNUTLS_CRYPTODEV
),y
)
173 CONFIGURE_ARGS
+= --enable-cryptodev
176 TARGET_CFLAGS
+= $(FPIC
)
178 define Build
/InstallDev
179 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
181 $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so
* \
184 $(PKG_INSTALL_DIR
)/usr
/include/gnutls \
187 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/gnutls.
pc \
188 $(1)/usr
/lib
/pkgconfig
/
192 define Package
/certtool
/conffiles
193 /etc
/gnutls
/certtool.cfg
196 define Package
/certtool
/install
197 $(INSTALL_DIR
) $(1)/etc
/gnutls
198 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
199 $(INSTALL_DIR
) $(1)/usr
/bin
200 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
204 define Package
/gnutls-utils
/install
205 $(INSTALL_DIR
) $(1)/usr
/bin
206 ifeq ($(CONFIG_GNUTLS_OCSP
),y
)
207 ifeq ($(CONFIG_GNUTLS_ANON
),y
)
209 $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} \
213 $(PKG_INSTALL_DIR
)/usr
/bin
/ocsptool \
216 ifeq ($(CONFIG_GNUTLS_SRP
),y
)
218 $(PKG_INSTALL_DIR
)/usr
/bin
/srptool \
221 ifeq ($(CONFIG_GNUTLS_PSK
),y
)
223 $(PKG_INSTALL_DIR
)/usr
/bin
/psktool \
226 ifeq ($(CONFIG_GNUTLS_PKCS11
),y
)
228 $(PKG_INSTALL_DIR
)/usr
/bin
/p11tool \
231 ifeq ($(CONFIG_GNUTLS_TPM
),y
)
233 $(PKG_INSTALL_DIR
)/usr
/bin
/tpmtool \
239 define Package
/libgnutls
/install
240 $(INSTALL_DIR
) $(1)/usr
/lib
241 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
245 $(eval
$(call BuildPackage
,certtool
))
246 $(eval
$(call BuildPackage
,gnutls-utils
))
247 $(eval
$(call BuildPackage
,libgnutls
))