summaryrefslogtreecommitdiff
path: root/package/nss/Makefile
blob: a07231662d5199efc0da8d68f249ef0896ca7dfa (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
64
65
66
67
68
69
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(ADK_TOPDIR)/rules.mk

PKG_NAME:=		nss
PKG_VERSION:=		3.20.1
PKG_RELEASE:=		1
PKG_MAJ_VERSION:=	3
PKG_MIN_VERSION:=	20
PKG_PATCH_VERSION:=	1
PKG_HASH:=		ad3c8f11dfd9570c2d04a6140d5ef7c2bdd0fe30d6c9e5548721a4251a5e8c97
PKG_DESCR:=		network security services library
PKG_SECTION:=		libs/crypto
PKG_BUILDDEP:=		nspr zlib sqlite
PKG_DEPENDS:=		nspr zlib libsqlite
PKG_URL:=		http://www.mozilla.org/projects/security/pki/nss/
PKG_SITES:=		https://ftp.mozilla.org/pub/security/nss/releases/NSS_${PKG_MAJ_VERSION}_${PKG_MIN_VERSION}_${PKG_PATCH_VERSION}_RTM/src/
PKG_NOPARALLEL:=	1

PKG_HOST_DEPENDS:=	!cygwin

DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz
WRKSRC=			${WRKDIST}/nss

include $(ADK_TOPDIR)/mk/package.mk

$(eval $(call PKG_template,NSS,nss,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

CONFIG_STYLE:=		manual
INSTALL_STYLE:=		manual

ifeq ($(ADK_LINUX_64),y)
ifeq ($(ADK_TARGET_ABI_N32),y)
TARGET_CFLAGS+=		-DNS_PTR_LE_32
endif
XAKE_FLAGS+=		USE_64=1
endif

MAKE_FLAGS+=		NATIVE_CC="${HOST_CC}" NATIVE_FLAGS="${HOST_CFLAGS}"
TARGET_CPPFLAGS+=	-I${STAGING_TARGET_DIR}/usr/include/nspr
TARGET_CFLAGS+=		-I${STAGING_TARGET_DIR}/usr/include/nspr

XAKE_FLAGS+=		SOURCE_MD_DIR=${WRKDIST}/dist DIST=${WRKDIST}/dist
XAKE_FLAGS+=		ARCHFLAG="${TARGET_CFLAGS} ${TARGET_CPPFLAGS} ${TARGET_LDFLAGS}"
XAKE_FLAGS+=		NSS_DISABLE_DBM=1 OS_TEST=${ADK_TARGET_CPU_ARCH} OS_TARGET=Linux OS_RELEASE=2.6 OS_ARCH=Linux
XAKE_FLAGS+=		ARTOOL="${TARGET_CROSS}ar" RANLIB="${TARGET_CROSS}ranlib" NSS_USE_SYSTEM_SQLITE=1
XAKE_FLAGS+=		NSS_USE_SYSTEM_ZLIB=1
ALL_TARGET:=		all

do-install:
	$(INSTALL_DIR) $(IDIR_NSS)/usr/lib
	${INSTALL_DATA} ${WRKDIST}/dist/lib/lib{nsssysinit,nssckbi,freebl3,ssl3,smime3,nss3,nssutil3,softokn3}.so \
		$(IDIR_NSS)/usr/lib
	${INSTALL_DIR} ${STAGING_TARGET_DIR}/usr/include/nss
	${INSTALL_DATA} ${WRKDIST}/dist/public/nss/* \
		${STAGING_TARGET_DIR}/usr/include/nss
	# needed for firefox
	${INSTALL_DIR} ${WRKINST}/usr/bin
	${INSTALL_BIN} ${WRKDIST}/dist/bin/nss-config \
		${WRKINST}/usr/bin
	${INSTALL_DIR} ${WRKINST}/usr/lib/pkgconfig
	${INSTALL_BIN} ${WRKDIST}/dist/lib/pkgconfig/nss.pc \
		${WRKINST}/usr/lib/pkgconfig
	${INSTALL_DIR} ${STAGING_TARGET_DIR}/usr/lib
	$(INSTALL_DATA) ${WRKDIST}/dist/lib/libcrmf.a \
		${STAGING_TARGET_DIR}/usr/lib

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