[package] update xmlrpc-c to 1.22.2 (#7250)
[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:=2.8.6
12 PKG_RELEASE:=1
13
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
18
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21 PKG_LIBTOOL_PATHS:=. lib libextra
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/gnutls/Default
26 SUBMENU:=SSL
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=GNU TLS
30 URL:=http://www.gnu.org/software/gnutls/
31 endef
32
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.
37 endef
38
39
40 define Package/certtool
41 $(call Package/gnutls/Default)
42 SECTION:=utils
43 CATEGORY:=Utilities
44 TITLE+= (certool utility)
45 DEPENDS+= +libgnutls +libncurses +libreadline
46 endef
47
48 define Package/certtool/description
49 $(call Package/gnutls/Default/description)
50 This package contains the GnuTLS certtool utility.
51 endef
52
53
54 define Package/gnutls-utils
55 $(call Package/gnutls/Default)
56 SECTION:=utils
57 CATEGORY:=Utilities
58 TITLE+= (utilities)
59 DEPENDS+= +libgnutls +libgnutls-extra
60 endef
61
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.
66 endef
67
68
69 define Package/libgnutls
70 $(call Package/gnutls/Default)
71 TITLE+= (library)
72 DEPENDS+= +zlib +libgcrypt +libgpg-error
73 endef
74
75 define Package/libgnutls/description
76 $(call Package/gnutls/Default/description)
77 This package contains the GnuTLS shared library, needed by other programs.
78 endef
79
80
81 define Package/libgnutls-extra
82 $(call Package/gnutls/Default)
83 TITLE+= (extra library)
84 DEPENDS+= +libgnutls
85 endef
86
87 define Package/libgnutls-extra/description
88 $(call Package/gnutls/Default/description)
89 This package contains the GnuTLS extra shared library.
90 endef
91
92
93 define Package/libgnutls-openssl
94 $(call Package/gnutls/Default)
95 TITLE+= (OpenSSL compat library)
96 DEPENDS+= +libgnutls
97 endef
98
99 define Package/libgnutls-openssl/description
100 $(call Package/gnutls/Default/description)
101 This package contains the GnuTLS OpenSSL compatibility layer shared library.
102 endef
103
104 CONFIGURE_ARGS+= \
105 --enable-shared \
106 --enable-static \
107 --disable-openpgp-authentication \
108 --disable-guile \
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" \
114 --without-lzo \
115
116 # XXX: AM_CFLAGS duplicates with CFLAGS
117 MAKE_FLAGS:= \
118 AM_CFLAGS="" \
119
120 TARGET_CFLAGS += $(FPIC)
121
122 define Build/Configure
123 $(SED) 's,-I$$$${includedir},,g' $(PKG_BUILD_DIR)/configure
124 $(SED) 's,-L$$$${libdir},,g' $(PKG_BUILD_DIR)/configure
125 $(call Build/Configure/Default)
126 endef
127
128 define Build/InstallDev
129 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
130 $(CP) \
131 $(PKG_INSTALL_DIR)/usr/include/gnutls \
132 $(1)/usr/include/
133 $(CP) \
134 $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} \
135 $(1)/usr/lib/
136 $(CP) \
137 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc \
138 $(1)/usr/lib/pkgconfig/
139 endef
140
141 define Package/certtool/conffiles
142 /etc/gnutls/certtool.cfg
143 endef
144
145 define Package/certtool/install
146 $(INSTALL_DIR) $(1)/etc/gnutls
147 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/certtool.cfg $(1)/etc/gnutls/
148 $(INSTALL_DIR) $(1)/usr/bin
149 $(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(1)/usr/bin/
150 endef
151
152
153 define Package/gnutls-utils/install
154 $(INSTALL_DIR) $(1)/usr/bin
155 $(CP) \
156 $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} \
157 $(PKG_INSTALL_DIR)/usr/bin/psktool \
158 $(PKG_INSTALL_DIR)/usr/bin/srptool \
159 $(1)/usr/bin/
160 endef
161
162
163 define Package/libgnutls/install
164 $(INSTALL_DIR) $(1)/usr/lib
165 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls.so.* $(1)/usr/lib/
166 endef
167
168
169 define Package/libgnutls-extra/install
170 $(INSTALL_DIR) $(1)/usr/lib
171 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-extra.so.* $(1)/usr/lib/
172 endef
173
174
175 define Package/libgnutls-openssl/install
176 $(INSTALL_DIR) $(1)/usr/lib
177 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(1)/usr/lib/
178 endef
179
180
181 $(eval $(call BuildPackage,certtool))
182 $(eval $(call BuildPackage,gnutls-utils))
183 $(eval $(call BuildPackage,libgnutls))
184 $(eval $(call BuildPackage,libgnutls-extra))
185 $(eval $(call BuildPackage,libgnutls-openssl))