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.29.3
8 release=1
9 source=(http://ftp.mozilla.org/pub/security/nss/releases/NSS_${version//./_}_RTM/src/$name-$version.tar.gz \
10 nss-config.in nss.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}
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 *.chk
38 cd ../../public/nss
39 install -t "$PKG/usr/include/nss" -m644 *.h
40 install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config
41
42 _version=$(printf "%i.%i.%i" ${version//./ })
43 sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
44
45 NSS_LIBS=`$PKG/usr/bin/nss-config --libs`
46 NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags`
47 NSPR_VERSION=`pkg-config --modversion nspr`
48 sed $SRC/nss.pc.in \
49 -e "s,%libdir%,/usr/lib," \
50 -e "s,%prefix%,/usr," \
51 -e "s,%exec_prefix%,/usr/bin," \
52 -e "s,%includedir%,/usr/include/nss," \
53 -e "s,%NSS_VERSION%,$version," \
54 -e "s,%NSPR_VERSION%,$NSPR_VERSION," \
55 -e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
56 -e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
57 $PKG/usr/lib/pkgconfig/nss.pc
58
59 }
|