2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
2023-10-24 16:00:57 +00:00
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
2022-02-05 14:23:32 +00:00
PKG_NAME = "nss"
2023-11-13 22:18:49 +00:00
PKG_VERSION = "3.94"
2022-02-05 14:23:32 +00:00
PKG_LICENSE = "Mozilla Public License"
PKG_SITE = "http://ftp.mozilla.org/"
2022-04-14 11:56:57 +00:00
PKG_URL = " https://ftp.mozilla.org/pub/security/nss/releases/NSS_ ${ PKG_VERSION //./_ } _RTM/src/nss- ${ PKG_VERSION } -with-nspr- $( get_pkg_version nspr) .tar.gz "
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_HOST = "nspr:host zlib:host"
PKG_DEPENDS_TARGET = "toolchain nss:host nspr zlib sqlite"
PKG_LONGDESC = "The Network Security Services (NSS) package is a set of libraries designed to support cross-platform development of security-enabled client and server applications"
PKG_TOOLCHAIN = "manual"
PKG_BUILD_FLAGS = "-parallel"
m a k e _ h o s t ( ) {
2022-04-14 11:56:57 +00:00
cd ${ PKG_BUILD } /nss
2022-02-05 14:23:32 +00:00
make clean || true
2022-04-14 11:56:57 +00:00
rm -rf ${ PKG_BUILD } /dist
INCLUDES = " -I ${ TOOLCHAIN } /include " \
2022-02-05 14:23:32 +00:00
make BUILD_OPT = 1 USE_64 = 1 \
2022-04-14 11:56:57 +00:00
PREFIX = ${ TOOLCHAIN } \
NSPR_INCLUDE_DIR = ${ TOOLCHAIN } /include/nspr \
USE_SYSTEM_ZLIB = 1 ZLIB_LIBS = " -lz -L ${ TOOLCHAIN } /lib " \
2022-02-05 14:23:32 +00:00
SKIP_SHLIBSIGN = 1 \
NSS_TESTS = "dummy" \
2022-04-14 11:56:57 +00:00
CC = ${ CC } LDFLAGS = " ${ LDFLAGS } -L ${ TOOLCHAIN } /lib " \
2022-02-05 14:23:32 +00:00
V = 1
}
m a k e i n s t a l l _ h o s t ( ) {
2022-04-14 11:56:57 +00:00
cd ${ PKG_BUILD }
${ STRIP } dist/Linux*/lib/*.so
cp -L dist/Linux*/lib/*.so ${ TOOLCHAIN } /lib
mkdir -p ${ TOOLCHAIN } /include/nss
cp -RL dist/{ public,private} /nss/* ${ TOOLCHAIN } /include/nss
cp -L dist/Linux*/lib/pkgconfig/nss.pc ${ TOOLCHAIN } /lib/pkgconfig
cp -L nss/coreconf/nsinstall/*/nsinstall ${ TOOLCHAIN } /bin
2022-02-05 14:23:32 +00:00
}
m a k e _ t a r g e t ( ) {
2022-04-14 11:56:57 +00:00
cd ${ PKG_BUILD } /nss
2022-02-05 14:23:32 +00:00
local TARGET_USE_64 = ""
2022-04-14 11:56:57 +00:00
[ " ${ TARGET_ARCH } " = "x86_64" -o " ${ TARGET_ARCH } " = "aarch64" ] && TARGET_USE_64 = "USE_64=1"
2022-02-05 14:23:32 +00:00
make clean || true
2022-04-14 11:56:57 +00:00
rm -rf ${ PKG_BUILD } /dist
make BUILD_OPT = 1 ${ TARGET_USE_64 } \
2022-02-05 14:23:32 +00:00
NSS_USE_SYSTEM_SQLITE = 1 \
2022-04-14 11:56:57 +00:00
NSPR_INCLUDE_DIR = ${ SYSROOT_PREFIX } /usr/include/nspr \
2022-02-05 14:23:32 +00:00
NSS_USE_SYSTEM_SQLITE = 1 \
USE_SYSTEM_ZLIB = 1 ZLIB_LIBS = -lz \
SKIP_SHLIBSIGN = 1 \
2022-04-14 11:56:57 +00:00
OS_TEST = ${ TARGET_ARCH } \
2022-02-05 14:23:32 +00:00
NSS_TESTS = "dummy" \
2022-04-14 11:56:57 +00:00
NSINSTALL = ${ TOOLCHAIN } /bin/nsinstall \
CPU_ARCH_TAG = ${ TARGET_ARCH } \
CC = ${ CC } \
LDFLAGS = " ${ LDFLAGS } -L ${ SYSROOT_PREFIX } /usr/lib " \
2022-02-05 14:23:32 +00:00
V = 1
}
m a k e i n s t a l l _ t a r g e t ( ) {
2022-04-14 11:56:57 +00:00
cd ${ PKG_BUILD }
${ STRIP } dist/Linux*/lib/*.so
cp -L dist/Linux*/lib/*.so ${ SYSROOT_PREFIX } /usr/lib
mkdir -p ${ SYSROOT_PREFIX } /usr/include/nss
cp -RL dist/{ public,private} /nss/* ${ SYSROOT_PREFIX } /usr/include/nss
cp -L dist/Linux*/lib/pkgconfig/nss.pc ${ SYSROOT_PREFIX } /usr/lib/pkgconfig
2022-02-05 14:23:32 +00:00
2022-06-30 10:28:25 +00:00
mkdir -p ${ INSTALL } /usr/lib
cp -PL dist/Linux*/lib/*.so ${ INSTALL } /usr/lib
2022-02-05 14:23:32 +00:00
}