fftw3: add missing dependency
[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:=2
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:=autoreconf
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 +libgnutls-extra +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 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
122
123 define Build/Configure
124 $(SED) 's,-I$$$${includedir},,g' $(PKG_BUILD_DIR)/configure
125 $(SED) 's,-L$$$${libdir},,g' $(PKG_BUILD_DIR)/configure
126 $(call Build/Configure/Default)
127 endef
128
129 define Build/InstallDev
130 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
131 $(CP) \
132 $(PKG_INSTALL_DIR)/usr/include/gnutls \
133 $(1)/usr/include/
134 $(CP) \
135 $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} \
136 $(1)/usr/lib/
137 $(CP) \
138 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc \
139 $(1)/usr/lib/pkgconfig/
140 endef
141
142 define Package/certtool/conffiles
143 /etc/gnutls/certtool.cfg
144 endef
145
146 define Package/certtool/install
147 $(INSTALL_DIR) $(1)/etc/gnutls
148 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/certtool.cfg $(1)/etc/gnutls/
149 $(INSTALL_DIR) $(1)/usr/bin
150 $(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(1)/usr/bin/
151 endef
152
153
154 define Package/gnutls-utils/install
155 $(INSTALL_DIR) $(1)/usr/bin
156 $(CP) \
157 $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} \
158 $(PKG_INSTALL_DIR)/usr/bin/psktool \
159 $(PKG_INSTALL_DIR)/usr/bin/srptool \
160 $(1)/usr/bin/
161 endef
162
163
164 define Package/libgnutls/install
165 $(INSTALL_DIR) $(1)/usr/lib
166 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls.so.* $(1)/usr/lib/
167 endef
168
169
170 define Package/libgnutls-extra/install
171 $(INSTALL_DIR) $(1)/usr/lib
172 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-extra.so.* $(1)/usr/lib/
173 endef
174
175
176 define Package/libgnutls-openssl/install
177 $(INSTALL_DIR) $(1)/usr/lib
178 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(1)/usr/lib/
179 endef
180
181
182 $(eval $(call BuildPackage,certtool))
183 $(eval $(call BuildPackage,gnutls-utils))
184 $(eval $(call BuildPackage,libgnutls))
185 $(eval $(call BuildPackage,libgnutls-extra))
186 $(eval $(call BuildPackage,libgnutls-openssl))