gnutls: Added gnutls 3.2.12
[openwrt/svn-archive/archive.git] / libs / gnutls / Makefile
1 #
2 # Copyright (C) 2005-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gnutls
11 PKG_VERSION:=3.2.12
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2
16 PKG_MD5SUM:=f507365940de8f095e1d867c6f0842f6
17 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
18
19 PKG_INSTALL:=1
20 PKG_LIBTOOL_PATHS:=. lib
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/gnutls/Default
25 SUBMENU:=SSL
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=GNU TLS
29 URL:=http://www.gnutls.org/
30 endef
31
32 define Package/gnutls/Default/description
33 GnuTLS is a secure communications library implementing the SSL, TLS
34 and DTLS protocols and technologies around them. It provides a simple
35 C language application programming interface (API) to access the secure
36 communications protocols as well as APIs to parse and write X.509, PKCS12,
37 OpenPGP and other required structures. It is aimed to be portable and
38 efficient with focus on security and interoperability.
39 endef
40
41
42 define Package/certtool
43 $(call Package/gnutls/Default)
44 SECTION:=utils
45 CATEGORY:=Utilities
46 TITLE+= (certool utility)
47 DEPENDS+= +libgnutls
48 endef
49
50 define Package/certtool/description
51 $(call Package/gnutls/Default/description)
52 This package contains the GnuTLS certtool utility.
53 endef
54
55
56 define Package/gnutls-utils
57 $(call Package/gnutls/Default)
58 SECTION:=utils
59 CATEGORY:=Utilities
60 TITLE+= (utilities)
61 DEPENDS+= +libgnutls
62 endef
63
64 define Package/gnutls-utils/description
65 $(call Package/gnutls/Default/description)
66 This package contains the GnuTLS gnutls-cli, gnutls-serv, psktool,
67 and srptool utilities.
68 endef
69
70
71 define Package/libgnutls
72 $(call Package/gnutls/Default)
73 TITLE+= (library)
74 DEPENDS+= +libnettle
75 endef
76
77 define Package/libgnutls/description
78 $(call Package/gnutls/Default/description)
79 This package contains the GnuTLS shared library, needed by other programs.
80 endef
81
82
83 define Package/libgnutls-openssl
84 $(call Package/gnutls/Default)
85 TITLE+= (OpenSSL compat library)
86 DEPENDS+= +libgnutls
87 endef
88
89 define Package/libgnutls-openssl/description
90 $(call Package/gnutls/Default/description)
91 This package contains the GnuTLS OpenSSL compatibility layer shared library.
92 endef
93
94 CONFIGURE_ARGS+= \
95 --enable-shared \
96 --enable-static \
97 --disable-openpgp-authentication \
98 --disable-libdane \
99 --disable-guile \
100 --disable-nls \
101 --without-zlib \
102 --with-included-libtasn1 \
103 --enable-local-libopts \
104 --disable-doc \
105 --disable-tests \
106 --disable-rsa-export \
107 --disable-crywrap \
108 --without-p11-kit \
109
110 # XXX: AM_CFLAGS duplicates with CFLAGS
111 MAKE_FLAGS:= \
112 AM_CFLAGS="" \
113
114 TARGET_CFLAGS += $(FPIC)
115 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
116
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)
121 endef
122
123 define Build/InstallDev
124 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
125 $(CP) \
126 $(PKG_INSTALL_DIR)/usr/include/gnutls \
127 $(1)/usr/include/
128 $(CP) \
129 $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-openssl}.{a,so*} \
130 $(1)/usr/lib/
131 $(CP) \
132 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls.pc \
133 $(1)/usr/lib/pkgconfig/
134 endef
135
136 define Package/certtool/conffiles
137 /etc/gnutls/certtool.cfg
138 endef
139
140 define Package/certtool/install
141 $(INSTALL_DIR) $(1)/etc/gnutls
142 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/certtool.cfg $(1)/etc/gnutls/
143 $(INSTALL_DIR) $(1)/usr/bin
144 $(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(1)/usr/bin/
145 endef
146
147
148 define Package/gnutls-utils/install
149 $(INSTALL_DIR) $(1)/usr/bin
150 $(CP) \
151 $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} \
152 $(PKG_INSTALL_DIR)/usr/bin/psktool \
153 $(PKG_INSTALL_DIR)/usr/bin/ocsptool \
154 $(PKG_INSTALL_DIR)/usr/bin/srptool \
155 $(1)/usr/bin/
156 endef
157
158
159 define Package/libgnutls/install
160 $(INSTALL_DIR) $(1)/usr/lib
161 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls.so.* $(1)/usr/lib/
162 endef
163
164
165 define Package/libgnutls-openssl/install
166 $(INSTALL_DIR) $(1)/usr/lib
167 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(1)/usr/lib/
168 endef
169
170
171 $(eval $(call BuildPackage,certtool))
172 $(eval $(call BuildPackage,gnutls-utils))
173 $(eval $(call BuildPackage,libgnutls))
174 $(eval $(call BuildPackage,libgnutls-openssl))