2 # Copyright (C) 2005-2010 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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=ftp
://ftp.gnutls.org
/gcrypt
/gnutls
/v3.2
16 PKG_MD5SUM
:=ec3b06f80e312137386c5d322183ca5a
17 PKG_MAINTAINER
:=Nikos Mavrogiannopoulos
<nmav@gnutls.org
>
20 PKG_LIBTOOL_PATHS
:=. lib
21 PKG_CHECK_FORMAT_SECURITY
:=0
23 include $(INCLUDE_DIR
)/package.mk
26 define Package
/gnutls
/Default
31 URL
:=http
://www.gnutls.org
/
34 define Package
/gnutls
/Default
/description
35 GnuTLS is a secure communications library implementing the SSL
, TLS
36 and DTLS protocols and technologies around them. It provides a simple
37 C language application programming interface
(API
) to access the secure
38 communications protocols
as well
as APIs to parse and write X
.509, PKCS12
,
39 OpenPGP and other required structures. It is aimed to be portable and
40 efficient with focus on security and interoperability.
44 define Package
/certtool
45 $(call Package
/gnutls
/Default
)
48 TITLE
+= (certool utility
)
52 define Package
/certtool
/description
53 $(call Package
/gnutls
/Default
/description
)
54 This package contains the GnuTLS certtool utility.
58 define Package
/gnutls-utils
59 $(call Package
/gnutls
/Default
)
66 define Package
/gnutls-utils
/description
67 $(call Package
/gnutls
/Default
/description
)
68 This package contains the GnuTLS gnutls-cli
, gnutls-serv
, psktool
,
69 and srptool utilities.
72 define Package
/libgnutls
/config
73 source
"$(SOURCE)/Config.in"
76 define Package
/libgnutls
77 $(call Package
/gnutls
/Default
)
79 DEPENDS
+= +libnettle
+!LIBNETTLE_MINI
:libgmp
+GNUTLS_EXT_LIBTASN1
:libtasn1
+GNUTLS_PKCS11
:p11-kit
82 define Package
/libgnutls
/description
83 $(call Package
/gnutls
/Default
/description
)
84 This package contains the GnuTLS shared library
, needed by other programs.
88 define Package
/libgnutls-openssl
89 $(call Package
/gnutls
/Default
)
90 TITLE
+= (OpenSSL compat library
)
94 define Package
/libgnutls-openssl
/description
95 $(call Package
/gnutls
/Default
/description
)
96 This package contains the GnuTLS OpenSSL compatibility layer shared library.
106 --enable-local-libopts \
109 --disable-rsa-export \
112 ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1
),y
)
113 CONFIGURE_ARGS
+= --with-included-libtasn1
116 ifneq ($(CONFIG_GNUTLS_PKCS11
),y
)
117 CONFIGURE_ARGS
+= --without-p11-kit
120 ifeq ($(CONFIG_LIBNETTLE_MINI
),y
)
121 CONFIGURE_ARGS
+= --with-nettle-mini
124 ifneq ($(CONFIG_GNUTLS_DTLS_SRTP
),y
)
125 CONFIGURE_ARGS
+= --disable-dtls-srtp-support
128 ifneq ($(CONFIG_GNUTLS_ALPN
),y
)
129 CONFIGURE_ARGS
+= --disable-alpn-support
132 ifneq ($(CONFIG_GNUTLS_HEARTBEAT
),y
)
133 CONFIGURE_ARGS
+= --disable-heartbeat-support
136 ifneq ($(CONFIG_GNUTLS_SRP
),y
)
137 CONFIGURE_ARGS
+= --disable-srp-authentication
140 ifneq ($(CONFIG_GNUTLS_PSK
),y
)
141 CONFIGURE_ARGS
+= --disable-psk-authentication
144 ifneq ($(CONFIG_GNUTLS_OPENPGP
),y
)
145 CONFIGURE_ARGS
+= --disable-openpgp-authentication
148 ifneq ($(CONFIG_GNUTLS_ANON
),y
)
149 CONFIGURE_ARGS
+= --disable-anon-authentication
152 ifneq ($(CONFIG_GNUTLS_OCSP
),y
)
153 CONFIGURE_ARGS
+= --disable-ocsp
156 ifeq ($(CONFIG_GNUTLS_CRYPTODEV
),y
)
157 CONFIGURE_ARGS
+= --enable-cryptodev
160 TARGET_CFLAGS
+= $(FPIC
)
161 TARGET_LDFLAGS
+= -Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
163 define Build
/Configure
164 $(SED
) 's,-I$$$${includedir},,g' $(PKG_BUILD_DIR
)/configure
165 $(SED
) 's,-L$$$${libdir},,g' $(PKG_BUILD_DIR
)/configure
166 $(call Build
/Configure
/Default
)
169 define Build
/InstallDev
170 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
172 $(PKG_INSTALL_DIR
)/usr
/include/gnutls \
175 $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls
{,-openssl
}.
{a
,so
*} \
178 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/gnutls.
pc \
179 $(1)/usr
/lib
/pkgconfig
/
182 define Package
/certtool
/conffiles
183 /etc
/gnutls
/certtool.cfg
186 define Package
/certtool
/install
187 $(INSTALL_DIR
) $(1)/etc
/gnutls
188 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
189 $(INSTALL_DIR
) $(1)/usr
/bin
190 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
194 define Package
/gnutls-utils
/install
195 $(INSTALL_DIR
) $(1)/usr
/bin
196 ifeq ($(CONFIG_GNUTLS_OCSP
),y
)
197 ifeq ($(CONFIG_GNUTLS_ANON
),y
)
199 $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} \
203 $(PKG_INSTALL_DIR
)/usr
/bin
/ocsptool \
206 ifeq ($(CONFIG_GNUTLS_SRP
),y
)
208 $(PKG_INSTALL_DIR
)/usr
/bin
/srptool \
211 ifeq ($(CONFIG_GNUTLS_PSK
),y
)
213 $(PKG_INSTALL_DIR
)/usr
/bin
/psktool \
216 ifeq ($(CONFIG_GNUTLS_PKCS11
),y
)
218 $(PKG_INSTALL_DIR
)/usr
/bin
/p11tool \
224 define Package
/libgnutls
/install
225 $(INSTALL_DIR
) $(1)/usr
/lib
226 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
230 define Package
/libgnutls-openssl
/install
231 $(INSTALL_DIR
) $(1)/usr
/lib
232 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-openssl.so.
* $(1)/usr
/lib
/
236 $(eval
$(call BuildPackage
,certtool
))
237 $(eval
$(call BuildPackage
,gnutls-utils
))
238 $(eval
$(call BuildPackage
,libgnutls
))
239 $(eval
$(call BuildPackage
,libgnutls-openssl
))