2 # Copyright (C) 2006 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.gz
16 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/ \
17 ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/ \
18 http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \
19 ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \
20 http://josefsson.org/gnutls/releases/
21 PKG_MD5SUM:=3585b5b204135e51e0efc9084b3e028b
24 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
25 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
27 include $(INCLUDE_DIR)/package.mk
29 define Package/gnutls/Default
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 proposed standards by the IETF's TLS working \\\
38 URL:=http://www.gnu.org/software/gnutls/
41 define Package/gnutls-utils
42 $(call Package/gnutls/Default)
49 This package contains some GnuTLS utilities.
52 define Package/libgnutls
53 $(call Package/gnutls/Default)
58 This package contains the GnuTLS shared libraries, needed by other programs.
61 define Package/libgnutls-openssl
62 $(call Package/gnutls/Default)
64 TITLE+= (OpenSSL compat library)
67 This package contains the GnuTLS OpenSSL compatibility layer shared library.
70 define Build/Configure
71 (cd $(PKG_BUILD_DIR); touch \
79 $(call Build/Configure/Default, \
82 --disable-srp-authentication \
83 --disable-anon-authentication \
84 --disable-openpgp-authentication \
85 --with-included-opencdk=yes \
86 --with-included-libtasn1=yes \
87 --with-included-libcfg=yes \
94 $(MAKE) -C $(PKG_BUILD_DIR) \
95 DESTDIR="$(PKG_INSTALL_DIR)" \
99 define Build/InstallDev
100 mkdir -p $(STAGING_DIR)/usr/bin
101 $(CP) $(PKG_INSTALL_DIR)/usr/bin/libgnutls{,-extra}-config $(STAGING_DIR)/usr/bin/
102 mkdir -p $(STAGING_DIR)/usr/include
103 $(CP) $(PKG_INSTALL_DIR)/usr/include/gnutls $(STAGING_DIR)/usr/include/
104 mkdir -p $(STAGING_DIR)/usr/lib
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} $(STAGING_DIR)/usr/lib/
106 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
107 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc $(STAGING_DIR)/usr/lib/pkgconfig/
108 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc
109 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc
110 mkdir -p $(STAGING_DIR)/usr/share/aclocal
111 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4 $(STAGING_DIR)/usr/share/aclocal/
114 define Build/UninstallDev
115 rm -rf $(STAGING_DIR)/usr/bin/libgnutls{,-extra}-config \
116 $(STAGING_DIR)/usr/include/gnutls \
117 $(STAGING_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} \
118 $(STAGING_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc \
119 $(STAGING_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4
122 define Package/gnutls-utils/install
123 $(INSTALL_DIR) $(1)/usr/bin
124 $(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(1)/usr/bin/
125 $(CP) $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} $(1)/usr/bin/
128 define Package/libgnutls/install
129 $(INSTALL_DIR) $(1)/usr/lib
130 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra}.so.* $(1)/usr/lib/
133 define Package/libgnutls-openssl/install
134 $(INSTALL_DIR) $(1)/usr/lib
135 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(1)/usr/lib/
138 $(eval $(call BuildPackage,gnutls-utils))
139 $(eval $(call BuildPackage,libgnutls))
140 $(eval $(call BuildPackage,libgnutls-openssl))