CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
nss: updated to 3.70
[ports/opt-arm.git] / nss / Pkgfile
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
6
7 name=nss
8 version=3.70
9 release=1
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)
12
13 build() {
14 cd $name-$version/
15
16 patch -Np1 -i ../nss-3.54-standalone-2.patch
17
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
23 export BUILD_OPT=1
24 export XCFLAGS="-Wno-error ${CFLAGS}"
25 export NSS_DISABLE_GTESTS=1
26
27 make -C nss
28
29 install -d $PKG/usr/{bin,lib/pkgconfig,include/nss}
30
31 cd dist/*.OBJ/bin
32 install -t "$PKG/usr/bin" *util shlibsign signtool signver ssltap
33 cd ../lib
34 install -t "$PKG/usr/lib" *.so
35 install -t "$PKG/usr/lib" -m644 libcrmf.a *.chk
36 cd ../../public/nss
37 install -t "$PKG/usr/include/nss" -m644 *.h
38 install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config
39
40 _version=$(printf "%i.%i.%i" ${version//./ })
41 sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
42
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`
46 sed $SRC/nss.pc.in \
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
56 }