2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://josefsson.org/gnutls/releases/ \
17 http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \
18 ftp://ftp.gnutls.org/pub/gnutls/ \
19 ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/ \
20 ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/
21 PKG_MD5SUM:=181b2ff554a83e6cf85505ea16699d39
25 include $(INCLUDE_DIR)/package.mk
27 define Package/gnutls/Default
31 URL:=http://www.gnu.org/software/gnutls/
34 define Package/gnutls/Default/description
35 GnuTLS is a project that aims to develop a library which provides a
36 secure layer, over a reliable transport layer. Currently the GnuTLS
37 library implements the proposed standards by the IETF's TLS working
42 define Package/certtool
43 $(call Package/gnutls/Default)
46 TITLE+= (certool utility)
47 DEPENDS+= +libgnutls +libncurses +libreadline
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)
61 DEPENDS+= +libgnutls +libgnutls-extra
64 define Package/gnutls-utils/description
65 $(call Package/gnutls/Default/description)
66 This package contains the GnuTLS gnutls-cli, gnutls-serv and psktool
71 define Package/libgnutls
72 $(call Package/gnutls/Default)
74 DEPENDS+= +libgcrypt +libgpg-error
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-extra
84 $(call Package/gnutls/Default)
85 TITLE+= (extra library)
89 define Package/libgnutls-extra/description
90 $(call Package/gnutls/Default/description)
91 This package contains the GnuTLS extra shared library.
95 define Package/libgnutls-openssl
96 $(call Package/gnutls/Default)
97 TITLE+= (OpenSSL compat library)
101 define Package/libgnutls-openssl/description
102 $(call Package/gnutls/Default/description)
103 This package contains the GnuTLS OpenSSL compatibility layer shared library.
107 # XXX: configure will disable any of theese if they're present regardless of
108 # the "--enable" prefix
109 # --enable-anon-authentication \
110 # --enable-openpgp-authentication \
111 # --enable-psk-authentication \
112 # --enable-srp-authentication \
113 # --enable-tls-authorization \
115 # and the following prevents the library from building so it's ommited
116 # --disable-tls-authorization
121 --disable-anon-authentication \
122 --disable-openpgp-authentication \
123 --disable-psk-authentication \
124 --disable-srp-authentication \
125 --with-included-libtasn1 \
126 --with-included-libcfg \
127 --without-included-opencdk \
129 --with-libgcrypt-prefix="$(STAGING_DIR)/usr" \
130 --without-libiconv-prefix \
131 --without-libintl-prefix \
132 --without-libopencdk-prefix \
133 --with-libreadline-prefix="$(STAGING_DIR)/usr" \
137 # XXX: AM_CFLAGS duplicates with CFLAGS
141 define Build/Configure
142 $(SED) 's,-I$$$${includedir},,g' $(PKG_BUILD_DIR)/configure
143 $(SED) 's,-L$$$${libdir},,g' $(PKG_BUILD_DIR)/configure
144 $(call Build/Configure/Default)
148 $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) DESTDIR="$(PKG_INSTALL_DIR)" all install
151 define Build/InstallDev
152 mkdir -p $(1)/usr/bin $(2)/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
153 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libgnutls{,-extra}-config $(2)/bin/
154 $(CP) $(PKG_INSTALL_DIR)/usr/include/gnutls $(1)/usr/include/
155 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} $(1)/usr/lib/
156 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc $(1)/usr/lib/pkgconfig/
159 define Package/certtool/conffiles
160 /etc/gnutls/certtool.cfg
163 define Package/certtool/install
164 $(INSTALL_DIR) $(1)/etc/gnutls
165 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/certtool.cfg $(1)/etc/gnutls/
166 $(INSTALL_DIR) $(1)/usr/bin
167 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/certtool $(1)/usr/bin/
171 define Package/gnutls-utils/install
172 $(INSTALL_DIR) $(1)/usr/bin
173 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} $(1)/usr/bin/
174 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/psktool $(1)/usr/bin/
178 define Package/libgnutls/install
179 $(INSTALL_DIR) $(1)/usr/lib
180 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls.so.* $(1)/usr/lib/
184 define Package/libgnutls-extra/install
185 $(INSTALL_DIR) $(1)/usr/lib
186 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-extra.so.* $(1)/usr/lib/
190 define Package/libgnutls-openssl/install
191 $(INSTALL_DIR) $(1)/usr/lib
192 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(1)/usr/lib/
196 $(eval $(call BuildPackage,certtool))
197 $(eval $(call BuildPackage,gnutls-utils))
198 $(eval $(call BuildPackage,libgnutls))
199 $(eval $(call BuildPackage,libgnutls-extra))
200 $(eval $(call BuildPackage,libgnutls-openssl))