bb0f960e96254f8774f0607261189b5cdb47b54a
[openwrt/svn-archive/archive.git] / libs / gnutls / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gnutls
12 PKG_VERSION:=1.0.25
13 PKG_RELEASE:=0
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=ftp://ftp.gnutls.org/pub/gnutls/ \
18 ftp://ftp.gnupg.org/gcrypt/alpha/gnutls/ \
19 http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \
20 ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \
21 http://josefsson.org/gnutls/releases/
22 PKG_MD5SUM:=3585b5b204135e51e0efc9084b3e028b
23 PKG_CAT:=zcat
24
25 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libgnutls
30 SECTION:=libs
31 CATEGORY:=Libraries
32 DEPENDS:=+libgcrypt
33 TITLE:=GNU TLS library
34 DESCRIPTION:=The GNU TLS library.\\\
35 GnuTLS is a project that aims to develop a library which provides a \\\
36 secure layer, over a reliable transport layer. Currently the GnuTLS \\\
37 library implements the proposed standards by the IETF's TLS working \\\
38 group.\\\
39 \\\
40 This packages contains the GnuTLS shared libraries, needed by other programs.
41 URL:=http://www.gnu.org/software/gnutls/
42 endef
43
44 define Package/libgnutls-openssl
45 SECTION:=libs
46 CATEGORY:=Libraries
47 DEPENDS:=libgnutls
48 TITLE:=GNU TLS OpenSSL compatibility layer library
49 DESCRIPTION:=The GNU TLS OpenSSL compatibility layer library.\\\
50 GnuTLS is a project that aims to develop a library which provides a \\\
51 secure layer, over a reliable transport layer. Currently the GnuTLS \\\
52 library implements the proposed standards by the IETF's TLS working \\\
53 group.\\\
54 \\\
55 This packages contains the GnuTLS OpenSSL compatibility layer shared library.
56 URL:=http://www.gnu.org/software/gnutls/
57 endef
58
59 define Package/gnutls-utils
60 SECTION:=utils
61 CATEGORY:=Utilities
62 DEPENDS:=+libgnutls
63 TITLE:=GNU TLS utilitis
64 DESCRIPTION:=The GNU TLS utilities.\\\
65 GnuTLS is a project that aims to develop a library which provides a \\\
66 secure layer, over a reliable transport layer. Currently the GnuTLS \\\
67 library implements the proposed standards by the IETF's TLS working \\\
68 group.\\\
69 \\\
70 This packages contains some GnuTLS utilities.
71 URL:=http://www.gnu.org/software/gnutls/
72 endef
73
74 define Build/Configure
75 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
76 touch configure.in ; \
77 touch acinclude.m4 ; \
78 touch aclocal.m4 ; \
79 touch Makefile.in ; \
80 touch config.h.in ; \
81 touch configure ; \
82 $(TARGET_CONFIGURE_OPTS) \
83 CFLAGS="$(TARGET_CFLAGS)" \
84 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
85 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
86 ./configure \
87 --target=$(GNU_TARGET_NAME) \
88 --host=$(GNU_TARGET_NAME) \
89 --build=$(GNU_HOST_NAME) \
90 --program-prefix="" \
91 --program-suffix="" \
92 --prefix=/usr \
93 --exec-prefix=/usr \
94 --bindir=/usr/bin \
95 --datadir=/usr/share \
96 --includedir=/usr/include \
97 --infodir=/usr/share/info \
98 --libdir=/usr/lib \
99 --libexecdir=/usr/lib \
100 --localstatedir=/var \
101 --mandir=/usr/share/man \
102 --sbindir=/usr/sbin \
103 --sysconfdir=/etc \
104 $(DISABLE_NLS) \
105 $(DISABLE_LARGEFILE) \
106 --enable-shared \
107 --enable-static \
108 --disable-rpath \
109 --disable-srp-authentication \
110 --disable-anon-authentication \
111 --disable-openpgp-authentication \
112 --with-included-opencdk=yes \
113 --with-included-libtasn1=yes \
114 --with-included-libcfg=yes \
115 --without-zlib \
116 --without-lzo \
117 );
118 endef
119
120 define Build/Compile
121 rm -rf $(PKG_INSTALL_DIR)
122 mkdir -p $(PKG_INSTALL_DIR)
123 $(MAKE) -C $(PKG_BUILD_DIR) \
124 DESTDIR="$(PKG_INSTALL_DIR)" \
125 all install
126 endef
127
128 define Package/libgnutls/install
129 install -m0755 -d $(1)/usr/lib
130 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra}.so.* $(1)/usr/lib/
131 endef
132
133 define Package/libgnutls-openssl/install
134 install -m0755 -d $(1)/usr/lib
135 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls-openssl.so.* $(1)/usr/lib/
136 endef
137
138 define Package/gnutls-utils/install
139 install -m0755 -d $(1)/usr/bin
140 $(CP) $(PKG_INSTALL_DIR)/usr/bin/certtool $(1)/usr/bin/
141 $(CP) $(PKG_INSTALL_DIR)/usr/bin/gnutls-{cli,serv} $(1)/usr/bin/
142 endef
143
144 define Build/InstallDev
145 mkdir -p $(STAGING_DIR)/usr/bin
146 $(CP) $(PKG_INSTALL_DIR)/usr/bin/libgnutls{,-extra}-config $(STAGING_DIR)/usr/bin/
147 mkdir -p $(STAGING_DIR)/usr/include
148 $(CP) $(PKG_INSTALL_DIR)/usr/include/gnutls $(STAGING_DIR)/usr/include/
149 mkdir -p $(STAGING_DIR)/usr/lib
150 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} $(STAGING_DIR)/usr/lib/
151 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
152 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc $(STAGING_DIR)/usr/lib/pkgconfig/
153 mkdir -p $(STAGING_DIR)/usr/share/aclocal
154 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4 $(STAGING_DIR)/usr/share/aclocal/
155 endef
156
157 define Build/UninstallDev
158 rm -rf \
159 $(STAGING_DIR)/usr/bin/libgnutls{,-extra}-config \
160 $(STAGING_DIR)/usr/include/gnutls \
161 $(STAGING_DIR)/usr/lib/libgnutls{,-extra,-openssl}.{a,so*} \
162 $(STAGING_DIR)/usr/lib/pkgconfig/gnutls{,-extra}.pc \
163 $(STAGING_DIR)/usr/share/aclocal/libgnutls{,-extra}.m4
164 endef
165
166 $(eval $(call BuildPackage,libgnutls))
167 $(eval $(call BuildPackage,libgnutls-openssl))
168 $(eval $(call BuildPackage,gnutls-utils))