54 lines
1.6 KiB
Plaintext
54 lines
1.6 KiB
Plaintext
# Description: Mozilla Network Security Services (NSS)
|
|
# URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
|
|
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
|
|
# Depends on: nspr-32 nss sqlite3-32 zlib-32
|
|
|
|
name=nss-32
|
|
version=3.107
|
|
release=1
|
|
source=(https://ftp.mozilla.org/pub/security/${name%-*}/releases/NSS_${version//./_}_RTM/src/${name%-*}-$version.tar.gz
|
|
nss-config.in nss.pc.in)
|
|
|
|
build() {
|
|
cd ${name%-*}-$version
|
|
|
|
sed -i nss/coreconf/Linux.mk \
|
|
-e 's|^CC.*=.*gcc$|#&|' \
|
|
-e 's|^CCC.*=.*g++$|#&|'
|
|
|
|
export NSPR_INCLUDE_DIR=/usr/include/nspr
|
|
export NSPR_LIB_DIR=/usr/lib32
|
|
export NSS_USE_SYSTEM_SQLITE=1
|
|
export NSS_ENABLE_ECC=1
|
|
export BUILD_OPT=1
|
|
export XCFLAGS="${CFLAGS}"
|
|
export XCFLAGS="${CFLAGS} -Wno-error"
|
|
export NSS_DISABLE_GTESTS=1
|
|
|
|
make -j1 -C nss all
|
|
|
|
install -d $PKG/usr/{bin,lib32/pkgconfig}
|
|
|
|
cd dist/*.OBJ/lib
|
|
install -t "$PKG/usr/lib32" *.so
|
|
install -t "$PKG/usr/lib32" -m644 libcrmf.a *.chk
|
|
install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config-32
|
|
|
|
_version=$(printf "%i.%i.%i" ${version//./ })
|
|
sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config-32
|
|
|
|
NSS_LIBS=`$PKG/usr/bin/nss-config-32 --libs`
|
|
NSS_CFLAGS=`$PKG/usr/bin/nss-config-32 --cflags`
|
|
NSPR_VERSION=`pkg-config --modversion nspr`
|
|
sed $SRC/nss.pc.in \
|
|
-e "s,%libdir%,/usr/lib32," \
|
|
-e "s,%prefix%,/usr," \
|
|
-e "s,%exec_prefix%,/usr/bin," \
|
|
-e "s,%includedir%,/usr/include/nss," \
|
|
-e "s,%NSS_VERSION%,$version," \
|
|
-e "s,%NSPR_VERSION%,$NSPR_VERSION," \
|
|
-e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
|
|
-e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
|
|
$PKG/usr/lib32/pkgconfig/nss.pc
|
|
}
|