1 # Description: Mozilla Network Security Services (NSS)
2 # URL: http://www.mozilla.org/projects/security/pki/nss/
3 # Maintainer: Fredrik Rinnestam, fredrik at rinnestam dot se
4 # Arch Maintainer: CRUX-ARM System Team. devel at crux-arm dot nu
5 # Depends on: nspr sqlite3
10 source=(http://ftp.mozilla.org/pub/security/nss/releases/NSS_${version//./_}_RTM/src/$name-$version.tar.gz \
11 nss-config.in nss.pc.in nss-3.54-standalone-2.patch)
16 patch -Np1 -i ../nss-3.54-standalone-2.patch
18 export NSPR_INCLUDE_DIR=/usr/include/nspr
19 export NSPR_LIB_DIR=/usr/lib
20 export NSS_USE_SYSTEM_SQLITE=1
21 export NSS_ENABLE_ECC=1
22 export NSS_ENABLE_TLS_1_3=1
24 export XCFLAGS="-Wno-error ${CFLAGS}"
25 export NSS_DISABLE_GTESTS=1
29 install -d $PKG/usr/{bin,lib/pkgconfig,include/nss}
32 install -t "$PKG/usr/bin" *util shlibsign signtool signver ssltap
34 install -t "$PKG/usr/lib" *.so
35 install -t "$PKG/usr/lib" -m644 libcrmf.a *.chk
37 install -t "$PKG/usr/include/nss" -m644 *.h
38 install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config
40 _version=$(printf "%i.%i.%i" ${version//./ })
41 sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
43 NSS_LIBS=`$PKG/usr/bin/nss-config --libs`
44 NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags`
45 NSPR_VERSION=`pkg-config --modversion nspr`
47 -e "s,%libdir%,/usr/lib," \
48 -e "s,%prefix%,/usr," \
49 -e "s,%exec_prefix%,/usr/bin," \
50 -e "s,%includedir%,/usr/include/nss," \
51 -e "s,%NSS_VERSION%,$version," \
52 -e "s,%NSPR_VERSION%,$NSPR_VERSION," \
53 -e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
54 -e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
55 $PKG/usr/lib/pkgconfig/nss.pc