1 # Description: Mozilla Network Security Services (NSS)
2 # URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
3 # Maintainer: Fredrik Rinnestam, fredrik at rinnestam dot se
4 # Depends on: nspr sqlite3
5
6 name=nss
7 version=3.44.1
8 release=1
9 source=(https://ftp.mozilla.org/pub/security/nss/releases/NSS_${version//./_}_RTM/src/$name-$version.tar.gz \
10 nss-config.in nss.pc.in nss-util.pc.in nss-softokn.pc.in)
11
12 build() {
13 cd $name-$version/
14
15 sed -i nss/coreconf/Linux.mk \
16 -e 's|^CC.*=.*gcc$|#&|' \
17 -e 's|^CCC.*=.*g++$|#&|'
18
19 export NSPR_INCLUDE_DIR=/usr/include/nspr
20 export NSPR_LIB_DIR=/usr/lib
21 export NSS_USE_SYSTEM_SQLITE=1
22 export NSS_ENABLE_ECC=1
23 export NSS_ENABLE_TLS_1_3=1
24 export BUILD_OPT=1
25 export XCFLAGS="-Wno-error ${CFLAGS}"
26 export NSS_DISABLE_GTESTS=1
27 export USE_64=1
28
29 make -j1 -C nss
30
31 install -d $PKG/usr/{bin,lib/pkgconfig,include/nss/private}
32
33 cd dist/*.OBJ/bin
34 install -t "$PKG/usr/bin" *util shlibsign signtool signver ssltap
35 cd ../lib
36 install -t "$PKG/usr/lib" *.so
37 install -t "$PKG/usr/lib" -m644 libcrmf.a libfreebl.a *.chk
38 cd ../../public/nss
39 install -t "$PKG/usr/include/nss" -m644 *.h
40 cd ../../private/nss
41 install -t "$PKG/usr/include/nss/private" -m644 blapi.h alghmac.h
42 install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config
43
44 _version=$(printf "%i.%i.%i" ${version//./ })
45 sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
46
47 NSS_LIBS=`$PKG/usr/bin/nss-config --libs`
48 NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags`
49 NSPR_VERSION=`pkg-config --modversion nspr`
50 for module in nss nss-util nss-softokn; do
51 sed $SRC/$module.pc.in \
52 -e "s,%libdir%,/usr/lib," \
53 -e "s,%prefix%,/usr," \
54 -e "s,%exec_prefix%,/usr/bin," \
55 -e "s,%includedir%,/usr/include/nss," \
56 -e "s,%NSS_VERSION%,$version," \
57 -e "s,%NSPR_VERSION%,$NSPR_VERSION," \
58 -e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
59 -e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
60 $PKG/usr/lib/pkgconfig/$module.pc
61 done
62
63 }
|