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.bz2
15 PKG_SOURCE_URL
:=@GNU
/gnutls \
16 ftp
://ftp.mirrors.wiretapped.net
/pub
/security
/network-security
/gnutls
/
17 PKG_MD5SUM
:=eb0a6d7d3cb9ac684d971c14f9f6d3ba
21 PKG_LIBTOOL_PATHS
:=. lib libextra
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/gnutls
/Default
30 URL
:=http
://www.gnu.org
/software
/gnutls
/
33 define Package
/gnutls
/Default
/description
34 GnuTLS is a project that aims to develop a library which provides a
35 secure layer
, over a reliable transport layer. Currently the GnuTLS
36 library implements the SSL
3.0, TLS
1.0, and TLS
1.1 protocols.
40 define Package
/certtool
41 $(call Package
/gnutls
/Default
)
44 TITLE
+= (certool utility
)
45 DEPENDS
+= +libgnutls
+libgnutls-extra
+libncurses
+libreadline
48 define Package
/certtool
/description
49 $(call Package
/gnutls
/Default
/description
)
50 This package contains the GnuTLS certtool utility.
54 define Package
/gnutls-utils
55 $(call Package
/gnutls
/Default
)
59 DEPENDS
+= +libgnutls
+libgnutls-extra
62 define Package
/gnutls-utils
/description
63 $(call Package
/gnutls
/Default
/description
)
64 This package contains the GnuTLS gnutls-cli
, gnutls-serv
, psktool
,
65 and srptool utilities.
69 define Package
/libgnutls
70 $(call Package
/gnutls
/Default
)
72 DEPENDS
+= +zlib
+libgcrypt
+libgpg-error
75 define Package
/libgnutls
/description
76 $(call Package
/gnutls
/Default
/description
)
77 This package contains the GnuTLS shared library
, needed by other programs.
81 define Package
/libgnutls-extra
82 $(call Package
/gnutls
/Default
)
83 TITLE
+= (extra library
)
87 define Package
/libgnutls-extra
/description
88 $(call Package
/gnutls
/Default
/description
)
89 This package contains the GnuTLS extra shared library.
93 define Package
/libgnutls-openssl
94 $(call Package
/gnutls
/Default
)
95 TITLE
+= (OpenSSL compat library
)
99 define Package
/libgnutls-openssl
/description
100 $(call Package
/gnutls
/Default
/description
)
101 This package contains the GnuTLS OpenSSL compatibility layer shared library.
107 --disable-openpgp-authentication \
109 --with-included-libcfg \
110 --with-included-libtasn1 \
111 --with-libgcrypt-prefix
="$(STAGING_DIR)/usr" \
112 --with-libreadline-prefix
="$(STAGING_DIR)/usr" \
113 --with-libz-prefix
="$(STAGING_DIR)/usr" \
116 # XXX: AM_CFLAGS duplicates with CFLAGS
120 TARGET_CFLAGS
+= $(FPIC
)
121 TARGET_LDFLAGS
+= -Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
123 define Build
/Configure
124 $(SED
) 's,-I$$$${includedir},,g' $(PKG_BUILD_DIR
)/configure
125 $(SED
) 's,-L$$$${libdir},,g' $(PKG_BUILD_DIR
)/configure
126 $(call Build
/Configure
/Default
)
129 define Build
/InstallDev
130 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
/pkgconfig
132 $(PKG_INSTALL_DIR
)/usr
/include/gnutls \
135 $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls
{,-extra
,-openssl
}.
{a
,so
*} \
138 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/gnutls
{,-extra
}.
pc \
139 $(1)/usr
/lib
/pkgconfig
/
142 define Package
/certtool
/conffiles
143 /etc
/gnutls
/certtool.cfg
146 define Package
/certtool
/install
147 $(INSTALL_DIR
) $(1)/etc
/gnutls
148 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
149 $(INSTALL_DIR
) $(1)/usr
/bin
150 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
154 define Package
/gnutls-utils
/install
155 $(INSTALL_DIR
) $(1)/usr
/bin
157 $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} \
158 $(PKG_INSTALL_DIR
)/usr
/bin
/psktool \
159 $(PKG_INSTALL_DIR
)/usr
/bin
/srptool \
164 define Package
/libgnutls
/install
165 $(INSTALL_DIR
) $(1)/usr
/lib
166 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
170 define Package
/libgnutls-extra
/install
171 $(INSTALL_DIR
) $(1)/usr
/lib
172 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-extra.so.
* $(1)/usr
/lib
/
176 define Package
/libgnutls-openssl
/install
177 $(INSTALL_DIR
) $(1)/usr
/lib
178 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-openssl.so.
* $(1)/usr
/lib
/
182 $(eval
$(call BuildPackage
,certtool
))
183 $(eval
$(call BuildPackage
,gnutls-utils
))
184 $(eval
$(call BuildPackage
,libgnutls
))
185 $(eval
$(call BuildPackage
,libgnutls-extra
))
186 $(eval
$(call BuildPackage
,libgnutls-openssl
))