2 # Copyright (C) 2005-2009 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.bz2
15 PKG_SOURCE_URL
:=@GNU
/gnutls \
16 ftp
://ftp.mirrors.wiretapped.net
/pub
/security
/network-security
/gnutls
/
17 PKG_MD5SUM
:=747111ab0d86e7b06a4bb120ba456ad8
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/gnutls
/Default
27 URL
:=http
://www.gnu.org
/software
/gnutls
/
30 define Package
/gnutls
/Default
/description
31 GnuTLS is a project that aims to develop a library which provides a
32 secure layer
, over a reliable transport layer. Currently the GnuTLS
33 library implements the SSL
3.0, TLS
1.0, and TLS
1.1 protocols.
37 define Package
/certtool
38 $(call Package
/gnutls
/Default
)
41 TITLE
+= (certool utility
)
42 DEPENDS
+= +libgnutls
+libncurses
+libreadline
45 define Package
/certtool
/description
46 $(call Package
/gnutls
/Default
/description
)
47 This package contains the GnuTLS certtool utility.
51 define Package
/gnutls-utils
52 $(call Package
/gnutls
/Default
)
56 DEPENDS
+= +libgnutls
+libgnutls-extra
59 define Package
/gnutls-utils
/description
60 $(call Package
/gnutls
/Default
/description
)
61 This package contains the GnuTLS gnutls-cli
, gnutls-serv
, psktool
,
62 and srptool utilities.
66 define Package
/libgnutls
67 $(call Package
/gnutls
/Default
)
69 DEPENDS
+= +zlib
+libgcrypt
+libgpg-error
72 define Package
/libgnutls
/description
73 $(call Package
/gnutls
/Default
/description
)
74 This package contains the GnuTLS shared library
, needed by other programs.
78 define Package
/libgnutls-extra
79 $(call Package
/gnutls
/Default
)
80 TITLE
+= (extra library
)
84 define Package
/libgnutls-extra
/description
85 $(call Package
/gnutls
/Default
/description
)
86 This package contains the GnuTLS extra shared library.
90 define Package
/libgnutls-openssl
91 $(call Package
/gnutls
/Default
)
92 TITLE
+= (OpenSSL compat library
)
96 define Package
/libgnutls-openssl
/description
97 $(call Package
/gnutls
/Default
/description
)
98 This package contains the GnuTLS OpenSSL compatibility layer shared library.
101 TARGET_CFLAGS
+= $(FPIC
)
106 --disable-openpgp-authentication \
107 --with-included-libcfg \
108 --with-included-libtasn1 \
109 --with-libgcrypt-prefix
="$(STAGING_DIR)/usr" \
110 --with-libreadline-prefix
="$(STAGING_DIR)/usr" \
111 --with-libz-prefix
="$(STAGING_DIR)/usr" \
113 # XXX: AM_CFLAGS duplicates with CFLAGS
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
)
124 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(MAKE_ARGS
) DESTDIR
="$(PKG_INSTALL_DIR)" all install
127 define Build
/InstallDev
128 mkdir
-p
$(1)/usr
/bin
$(2)/bin
$(1)/usr
/include $(1)/usr
/lib
$(1)/usr
/lib
/pkgconfig
129 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/libgnutls
{,-extra
}-config
$(2)/bin
/
130 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gnutls
$(1)/usr
/include/
131 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls
{,-extra
,-openssl
}.
{a
,so
*} $(1)/usr
/lib
/
132 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/gnutls
{,-extra
}.
pc $(1)/usr
/lib
/pkgconfig
/
135 define Package
/certtool
/conffiles
136 /etc
/gnutls
/certtool.cfg
139 define Package
/certtool
/install
140 $(INSTALL_DIR
) $(1)/etc
/gnutls
141 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
142 $(INSTALL_DIR
) $(1)/usr
/bin
143 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
147 define Package
/gnutls-utils
/install
148 $(INSTALL_DIR
) $(1)/usr
/bin
149 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} $(1)/usr
/bin
/
150 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/psktool
$(1)/usr
/bin
/
151 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/srptool
$(1)/usr
/bin
/
155 define Package
/libgnutls
/install
156 $(INSTALL_DIR
) $(1)/usr
/lib
157 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
161 define Package
/libgnutls-extra
/install
162 $(INSTALL_DIR
) $(1)/usr
/lib
163 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-extra.so.
* $(1)/usr
/lib
/
167 define Package
/libgnutls-openssl
/install
168 $(INSTALL_DIR
) $(1)/usr
/lib
169 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-openssl.so.
* $(1)/usr
/lib
/
173 $(eval
$(call BuildPackage
,certtool
))
174 $(eval
$(call BuildPackage
,gnutls-utils
))
175 $(eval
$(call BuildPackage
,libgnutls
))
176 $(eval
$(call BuildPackage
,libgnutls-extra
))
177 $(eval
$(call BuildPackage
,libgnutls-openssl
))