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 $(call libtool_fixup_libdir
,$(PKG_INSTALL_DIR
))
149 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(MAKE_ARGS
) DESTDIR
="$(PKG_INSTALL_DIR)" install
152 define Build
/InstallDev
153 mkdir
-p
$(STAGING_DIR
)/usr
/bin
154 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/libgnutls
{,-extra
}-config
$(STAGING_DIR
)/usr
/bin
/
155 mkdir
-p
$(STAGING_DIR
)/usr
/include
156 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gnutls
$(STAGING_DIR
)/usr
/include/
157 mkdir
-p
$(STAGING_DIR
)/usr
/lib
158 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls
{,-extra
,-openssl
}.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
159 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
160 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/gnutls
{,-extra
}.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
161 $(SED
) 's,-I$$$${includedir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/gnutls
{,-extra
}.
pc
162 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/gnutls
{,-extra
}.
pc
165 define Build
/UninstallDev
166 rm -rf
$(STAGING_DIR
)/usr
/bin
/libgnutls
{,-extra
}-config \
167 $(STAGING_DIR
)/usr
/include/gnutls \
168 $(STAGING_DIR
)/usr
/lib
/libgnutls
{,-extra
,-openssl
}.
{a
,so
*} \
169 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/gnutls
{,-extra
}.
pc
173 define Package
/certtool
/conffiles
174 /etc
/gnutls
/certtool.cfg
177 define Package
/certtool
/install
178 $(INSTALL_DIR
) $(1)/etc
/gnutls
179 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/certtool.cfg
$(1)/etc
/gnutls
/
180 $(INSTALL_DIR
) $(1)/usr
/bin
181 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/certtool
$(1)/usr
/bin
/
185 define Package
/gnutls-utils
/install
186 $(INSTALL_DIR
) $(1)/usr
/bin
187 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gnutls-
{cli
,serv
} $(1)/usr
/bin
/
188 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/psktool
$(1)/usr
/bin
/
192 define Package
/libgnutls
/install
193 $(INSTALL_DIR
) $(1)/usr
/lib
194 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls.so.
* $(1)/usr
/lib
/
198 define Package
/libgnutls-extra
/install
199 $(INSTALL_DIR
) $(1)/usr
/lib
200 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-extra.so.
* $(1)/usr
/lib
/
204 define Package
/libgnutls-openssl
/install
205 $(INSTALL_DIR
) $(1)/usr
/lib
206 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnutls-openssl.so.
* $(1)/usr
/lib
/
210 $(eval
$(call BuildPackage
,certtool
))
211 $(eval
$(call BuildPackage
,gnutls-utils
))
212 $(eval
$(call BuildPackage
,libgnutls
))
213 $(eval
$(call BuildPackage
,libgnutls-extra
))
214 $(eval
$(call BuildPackage
,libgnutls-openssl
))