summaryrefslogtreecommitdiff
path: root/package/gnutls/Makefile
blob: d8d090a6cf918f72341182d03048663b75e2d1ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include ${TOPDIR}/rules.mk

PKG_NAME:=		gnutls
PKG_VERSION:=		2.8.3
PKG_RELEASE:=		1
PKG_MD5SUM:=		72b77092c5d1ae01306cd14c0f22d6e4
PKG_DESCR:=		GNU TLS library
PKG_SECTION:=		libs
PKG_DEPENDS:=		libgcrypt libtasn1 zlib
PKG_URL:=		http://www.gnu.org/software/gnutls
PKG_SITES:=		${MASTER_SITE_GNU:=gnutls/}

DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.bz2

include ${TOPDIR}/mk/package.mk

ifeq (${ADK_COMPILE_GNUTLS_WITH_UCLIBCXX},y)
TCXXFLAGS+=		-fno-builtin -nostdinc++ -nodefaultlibs -I${STAGING_DIR}/usr/include/uClibc++
TLDFLAGS+=		-nodefaultlibs -luClibc++
PKG_DEPENDS_1:=		${PKG_DEPENDS} uclibc++
else
PKG_DEPENDS_1:=		${PKG_DEPENDS} libstdcxx
endif

$(eval $(call PKG_template,LIBGNUTLS,libgnutls,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,GNUTLS_UTILS,gnutls-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,LIBGNUTLS_EXTRA,libgnutls-extra,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,LIBGNUTLS_OPENSSL,libgnutls-openssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,LIBGNUTLSXX,libgnutlsxx,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR},${PKG_SECTION}))

TCFLAGS+=		-lncurses
CONFIGURE_STYLE=	gnu
CONFIGURE_ARGS+=	--without-libopencdk-prefix \
			--without-libz-prefix
BUILD_STYLE=		auto
INSTALL_STYLE=		auto

ifeq (${ADK_COMPILE_GNUTLS_WITH_UCLIBCXX},y)
# add workaround because libtool tries to link libstdc++
post-configure:
	${SED} 's#postdeps="-lstdc.*#postdeps="-lm"#' \
	    ${WRKBUILD}/libtool
endif

post-install:
	${INSTALL_DIR} ${IDIR_LIBGNUTLS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libgnutls.so.* ${IDIR_LIBGNUTLS}/usr/lib
	${INSTALL_DIR} ${IDIR_LIBGNUTLS_EXTRA}/usr/lib
	${CP} ${WRKINST}/usr/lib/libgnutls-extra.so.* ${IDIR_LIBGNUTLS_EXTRA}/usr/lib
	${INSTALL_DIR} ${IDIR_LIBGNUTLS_OPENSSL}/usr/lib
	${CP} ${WRKINST}/usr/lib/libgnutls-openssl.so.* ${IDIR_LIBGNUTLS_OPENSSL}/usr/lib
	${INSTALL_DIR} ${IDIR_GNUTLS_UTILS}/usr/bin
	${CP} ${WRKINST}/usr/bin/{{cert,srp,psk}tool,gnutls-{cli,serv}} \
	    ${IDIR_GNUTLS_UTILS}/usr/bin
ifeq ($(ADK_CXX),y)
	${INSTALL_DIR} ${IDIR_LIBGNUTLSXX}/usr/lib
	${CP} ${WRKINST}/usr/lib/libgnutlsxx.so.* ${IDIR_LIBGNUTLSXX}/usr/lib
endif

include ${TOPDIR}/mk/pkg-bottom.mk