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:=f507365940de8f095e1d867c6f0842f6
17 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
20 PKG_LIBTOOL_PATHS:=. lib
22 include $(INCLUDE_DIR)/package.mk
24 define Package/gnutls/Default
29 URL:=http://www.gnutls.org/
32 define Package/gnutls/Default/description
33 GnuTLS is a secure communications library implementing the SSL, TLS
34 and DTLS protocols and technologies around them. It provides a simple
35 C language application programming interface (API) to access the secure
36 communications protocols as well as APIs to parse and write X.509, PKCS12,
37 OpenPGP and other required structures. It is aimed to be portable and
38 efficient with focus on security and interoperability.
42 define Package/certtool
43 $(call Package/gnutls/Default)
46 TITLE+= (certool utility)
50 define Package/certtool/description
51 $(call Package/gnutls/Default/description)
52 This package contains the GnuTLS certtool utility.
56 define Package/gnutls-utils
57 $(call Package/gnutls/Default)
64 define Package/gnutls-utils/description
65 $(call Package/gnutls/Default/description)
66 This package contains the GnuTLS gnutls-cli, gnutls-serv, psktool,
67 and srptool utilities.
71 define Package/libgnutls
72 $(call Package/gnutls/Default)
77 define Package/libgnutls/description
78 $(call Package/gnutls/Default/description)
79 This package contains the GnuTLS shared library, needed by other programs.
83 define Package/libgnutls-openssl
84 $(call Package/gnutls/Default)
85 TITLE+= (OpenSSL compat library)
89 define Package/libgnutls-openssl/description
90 $(call Package/gnutls/Default/description)
91 This package contains the GnuTLS OpenSSL compatibility layer shared library.
97 --disable-openpgp-authentication \
102 --with-included-libtasn1 \
103 --enable-local-libopts \
106 --disable-rsa-export \
110 # XXX: AM_CFLAGS duplicates with CFLAGS
114 TARGET_CFLAGS += $(FPIC)
115 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
117 define Build/Configure
118 $(SED) 's,-I$$$${includedir},,g' $(PKG_BUILD_DIR)/configure
119 $(SED) 's,-L$$$${libdir},,g' $(PKG_BUILD_DIR)/configure
120 $(call Build/Configure/Default)
123 define Build/InstallDev
124 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
126 $(PKG_INSTALL_DIR)/usr/include/gnutls \
129 $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-openssl}.{a,so*} \
132 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls.pc \
133 $(1)/usr/lib/pkgconfig/
136 define Package/certtool/conffiles
137 /etc/gnutls/certtool.cfg
140 define Package/certtool/install
141 $(INSTALL_DIR) $(1)/etc/gnutls
142 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/certtool.cfg $(1)/etc/gnutls/
143 $(INSTALL_DIR) $(1)/usr/bin
144 $(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(1)/usr/bin/
148 define Package/gnutls-utils/install
149 $(INSTALL_DIR) $(1)/usr/bin
151 $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} \
152 $(PKG_INSTALL_DIR)/usr/bin/psktool \
153 $(PKG_INSTALL_DIR)/usr/bin/ocsptool \
154 $(PKG_INSTALL_DIR)/usr/bin/srptool \
159 define Package/libgnutls/install
160 $(INSTALL_DIR) $(1)/usr/lib
161 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls.so.* $(1)/usr/lib/
165 define Package/libgnutls-openssl/install
166 $(INSTALL_DIR) $(1)/usr/lib
167 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(1)/usr/lib/
171 $(eval $(call BuildPackage,certtool))
172 $(eval $(call BuildPackage,gnutls-utils))
173 $(eval $(call BuildPackage,libgnutls))
174 $(eval $(call BuildPackage,libgnutls-openssl))