opt/nss/Pkgfile
John Vogel 16a0872c60 nss: additional headers, library, pkgconfig files
Add files to support building openjdk with sunec enabled.
This patch adds installing the freebl static library
and the headers necessary to build with it, as well as
pkg-config files for the nss-util and nss-softokn modules
which the icedtea build harness looks for when verifying
whether system supports sun elliptic curve crypto.
2017-06-24 14:40:32 +02:00

64 lines
1.9 KiB
Plaintext

# Description: Mozilla Network Security Services (NSS)
# URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
# Maintainer: Fredrik Rinnestam, fredrik at rinnestam dot se
# Depends on: nspr sqlite3
name=nss
version=3.31
release=2
source=(http://ftp.mozilla.org/pub/security/nss/releases/NSS_${version//./_}_RTM/src/$name-$version.tar.gz \
nss-config.in nss.pc.in nss-util.pc.in nss-softokn.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/lib
export NSS_USE_SYSTEM_SQLITE=1
export NSS_ENABLE_ECC=1
export NSS_ENABLE_TLS_1_3=1
export BUILD_OPT=1
export XCFLAGS="-Wno-error ${CFLAGS}"
export NSS_DISABLE_GTESTS=1
export USE_64=1
make -j1 -C nss
install -d $PKG/usr/{bin,lib/pkgconfig,include/nss/private}
cd dist/*.OBJ/bin
install -t "$PKG/usr/bin" *util shlibsign signtool signver ssltap
cd ../lib
install -t "$PKG/usr/lib" *.so
install -t "$PKG/usr/lib" -m644 libcrmf.a libfreebl.a *.chk
cd ../../public/nss
install -t "$PKG/usr/include/nss" -m644 *.h
cd ../../private/nss
install -t "$PKG/usr/include/nss/private" -m644 blapi.h alghmac.h
install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config
_version=$(printf "%i.%i.%i" ${version//./ })
sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
NSS_LIBS=`$PKG/usr/bin/nss-config --libs`
NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags`
NSPR_VERSION=`pkg-config --modversion nspr`
for module in nss nss-util nss-softokn; do
sed $SRC/$module.pc.in \
-e "s,%libdir%,/usr/lib," \
-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/lib/pkgconfig/$module.pc
done
}