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
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/gnutls
/Default
29 URL
:=http
://www.gnu.org
/software
/gnutls
/
32 define Package
/gnutls
/Default
/description
33 GnuTLS is a project that aims to develop a library which provides a
34 secure layer
, over a reliable transport layer. Currently the GnuTLS
35 library implements the proposed standards by the IETF
's TLS working
40 define Package/certtool
41 $(call Package/gnutls/Default)
44 TITLE+= (certool utility)
45 DEPENDS+= +libgnutls +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 and psktool
69 define Package/libgnutls
70 $(call Package/gnutls/Default)
72 DEPENDS+= +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.
105 # XXX: configure will disable any of theese if they're present regardless of
106 # the "--enable" prefix
107 # --enable-anon-authentication \
108 # --enable-openpgp-authentication \
109 # --enable-psk-authentication \
110 # --enable-srp-authentication \
111 # --enable-tls-authorization \
113 # and the following prevents the library from building so it's ommited
114 # --disable-tls-authorization
119 --disable-anon-authentication \
120 --disable-openpgp-authentication \
121 --disable-psk-authentication \
122 --disable-srp-authentication \
123 --with-included-libtasn1 \
124 --with-included-libcfg \
125 --without-included-opencdk \
127 --with-libgcrypt-prefix
="$(STAGING_DIR)/usr" \
128 --without-libiconv-prefix \
129 --without-libintl-prefix \
130 --without-libopencdk-prefix \
131 --with-libreadline-prefix
="$(STAGING_DIR)/usr" \
135 # XXX: AM_CFLAGS duplicates with CFLAGS
139 define Build
/Configure
140 $(SED
) 's,-I$$$${includedir},,g' $(PKG_BUILD_DIR
)/configure
141 $(SED
) 's,-L$$$${libdir},,g' $(PKG_BUILD_DIR
)/configure
142 $(call Build
/Configure
/Default
)
143 $(call libtool_disable_rpath
)
147 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(MAKE_ARGS
) all
148 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(MAKE_ARGS
) DESTDIR
="$(PKG_INSTALL_DIR)" install
149 $(call libtool_fixup_libdir
,$(PKG_INSTALL_DIR
))
152 define Build
/InstallDev
153 mkdir
-p
$(1)/usr
/bin
154 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/libgnutls
{,-extra
}-config
$(2)/bin
/
155 mkdir
-p
$(1)/usr
/include
156 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gnutls
$(1)/usr
/include/
157 mkdir
-p
$(1)/usr
/lib
158 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls
{,-extra
,-openssl
}.
{a
,so
*} $(1)/usr
/lib
/
159 mkdir
-p
$(1)/usr
/lib
/pkgconfig
160 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/gnutls
{,-extra
}.
pc $(1)/usr
/lib
/pkgconfig
/
163 define Package
/certtool
/conffiles
164 /etc
/gnutls
/certtool.cfg
167 define Package
/certtool
/install
168 $(INSTALL_DIR
) $(1)/etc
/gnutls
169 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
170 $(INSTALL_DIR
) $(1)/usr
/bin
171 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
175 define Package
/gnutls-utils
/install
176 $(INSTALL_DIR
) $(1)/usr
/bin
177 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} $(1)/usr
/bin
/
178 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/psktool
$(1)/usr
/bin
/
182 define Package
/libgnutls
/install
183 $(INSTALL_DIR
) $(1)/usr
/lib
184 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
188 define Package
/libgnutls-extra
/install
189 $(INSTALL_DIR
) $(1)/usr
/lib
190 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-extra.so.
* $(1)/usr
/lib
/
194 define Package
/libgnutls-openssl
/install
195 $(INSTALL_DIR
) $(1)/usr
/lib
196 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-openssl.so.
* $(1)/usr
/lib
/
200 $(eval
$(call BuildPackage
,certtool
))
201 $(eval
$(call BuildPackage
,gnutls-utils
))
202 $(eval
$(call BuildPackage
,libgnutls
))
203 $(eval
$(call BuildPackage
,libgnutls-extra
))
204 $(eval
$(call BuildPackage
,libgnutls-openssl
))