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
:=https
://www.gnupg.org
/ftp
/gcrypt
/gnutls
/v3.6
17 PKG_HASH
:=fbba12f3db9a55dbf027e14111755817ec44b57eabec3e8089aac8ac6f533cf8
18 #PKG_FIXUP:=autoreconf gettext-version
19 PKG_MAINTAINER
:=Nikos Mavrogiannopoulos
<nmav@gnutls.org
>
20 PKG_LICENSE
:=LGPL-2.1
-or-later
21 PKG_CPE_ID
:=cpe
:/a
:gnu
:gnutls
25 PKG_LIBTOOL_PATHS
:=. lib
27 PKG_CONFIG_DEPENDS
:= \
30 CONFIG_GNUTLS_CRYPTODEV \
31 CONFIG_GNUTLS_DTLS_SRTP \
32 CONFIG_GNUTLS_EXT_LIBTASN1 \
33 CONFIG_GNUTLS_HEARTBEAT \
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
+libatomic
102 define Package
/libgnutls
/description
103 $(call Package
/gnutls
/Default
/description
)
104 This package contains the GnuTLS shared library
, needed by other programs.
107 # We disable the configuration file (system-priority-file) because
108 # the use of configuration increases the non-shared memory used by
109 # the library and we don't provide an openwrt-specific configuration
115 --disable-gcc-warnings \
118 --disable-seccomp-tests \
120 --disable-valgrind-tests \
123 --disable-ssl2-support \
124 --disable-ssl3-support \
125 --enable-local-libopts \
127 --with-default-trust-store-dir
=/etc
/ssl
/certs
/ \
128 --with-included-unistring \
129 --with-librt-prefix
="$(LIBRT_ROOT_DIR)/" \
131 --with-system-priority-file
=""
133 ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1
),y
)
134 CONFIGURE_ARGS
+= --with-included-libtasn1
137 ifneq ($(CONFIG_GNUTLS_PKCS11
),y
)
138 CONFIGURE_ARGS
+= --without-p11-kit
141 ifeq ($(CONFIG_LIBNETTLE_MINI
),y
)
142 CONFIGURE_ARGS
+= --with-nettle-mini
145 ifneq ($(CONFIG_GNUTLS_DTLS_SRTP
),y
)
146 CONFIGURE_ARGS
+= --disable-dtls-srtp-support
149 ifneq ($(CONFIG_GNUTLS_ALPN
),y
)
150 CONFIGURE_ARGS
+= --disable-alpn-support
153 ifneq ($(CONFIG_GNUTLS_HEARTBEAT
),y
)
154 CONFIGURE_ARGS
+= --disable-heartbeat-support
157 ifneq ($(CONFIG_GNUTLS_SRP
),y
)
158 CONFIGURE_ARGS
+= --disable-srp-authentication
161 ifneq ($(CONFIG_GNUTLS_PSK
),y
)
162 CONFIGURE_ARGS
+= --disable-psk-authentication
165 ifneq ($(CONFIG_GNUTLS_ANON
),y
)
166 CONFIGURE_ARGS
+= --disable-anon-authentication
169 ifneq ($(CONFIG_GNUTLS_OCSP
),y
)
170 CONFIGURE_ARGS
+= --disable-ocsp
173 ifneq ($(CONFIG_GNUTLS_TPM
),y
)
174 CONFIGURE_ARGS
+= --without-tpm
177 ifeq ($(CONFIG_GNUTLS_CRYPTODEV
),y
)
178 CONFIGURE_ARGS
+= --enable-cryptodev
181 define Build
/InstallDev
182 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
184 $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so
* \
187 $(PKG_INSTALL_DIR
)/usr
/include/gnutls \
190 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/gnutls.
pc \
191 $(1)/usr
/lib
/pkgconfig
/
195 define Package
/certtool
/conffiles
196 /etc
/gnutls
/certtool.cfg
199 define Package
/certtool
/install
200 $(INSTALL_DIR
) $(1)/etc
/gnutls
201 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
202 $(INSTALL_DIR
) $(1)/usr
/bin
203 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
207 define Package
/gnutls-utils
/install
208 $(INSTALL_DIR
) $(1)/usr
/bin
209 ifeq ($(CONFIG_GNUTLS_OCSP
),y
)
210 ifeq ($(CONFIG_GNUTLS_ANON
),y
)
212 $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} \
216 $(PKG_INSTALL_DIR
)/usr
/bin
/ocsptool \
219 ifeq ($(CONFIG_GNUTLS_SRP
),y
)
221 $(PKG_INSTALL_DIR
)/usr
/bin
/srptool \
224 ifeq ($(CONFIG_GNUTLS_PSK
),y
)
226 $(PKG_INSTALL_DIR
)/usr
/bin
/psktool \
229 ifeq ($(CONFIG_GNUTLS_PKCS11
),y
)
231 $(PKG_INSTALL_DIR
)/usr
/bin
/p11tool \
234 ifeq ($(CONFIG_GNUTLS_TPM
),y
)
236 $(PKG_INSTALL_DIR
)/usr
/bin
/tpmtool \
242 define Package
/libgnutls
/install
243 $(INSTALL_DIR
) $(1)/usr
/lib
244 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
248 $(eval
$(call BuildPackage
,certtool
))
249 $(eval
$(call BuildPackage
,gnutls-utils
))
250 $(eval
$(call BuildPackage
,libgnutls
))