CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
keyutils: updated to 1.6.1
[ports/opt-arm.git] / nss / Pkgfile
CommitLineData
987fdba5
JB
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
7name=nss
fad4638a 8version=3.46.1
7977b04f 9release=1
ba655a90 10source=(http://ftp.mozilla.org/pub/security/nss/releases/NSS_${version//./_}_RTM/src/$name-$version.tar.gz \
987fdba5
JB
11 nss-config.in nss.pc.in)
12
13build() {
ba655a90
VM
14cd $name-$version/
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
28 make -j1 -C nss
29
30 install -d $PKG/usr/{bin,lib/pkgconfig,include/nss}
31
32 cd dist/*.OBJ/bin
33 install -t "$PKG/usr/bin" *util shlibsign signtool signver ssltap
34 cd ../lib
35 install -t "$PKG/usr/lib" *.so
36 install -t "$PKG/usr/lib" -m644 libcrmf.a *.chk
37 cd ../../public/nss
38 install -t "$PKG/usr/include/nss" -m644 *.h
39 install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config
40
41 _version=$(printf "%i.%i.%i" ${version//./ })
42 sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
43
44 NSS_LIBS=`$PKG/usr/bin/nss-config --libs`
45 NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags`
46 NSPR_VERSION=`pkg-config --modversion nspr`
47 sed $SRC/nss.pc.in \
48 -e "s,%libdir%,/usr/lib," \
49 -e "s,%prefix%,/usr," \
50 -e "s,%exec_prefix%,/usr/bin," \
51 -e "s,%includedir%,/usr/include/nss," \
52 -e "s,%NSS_VERSION%,$version," \
53 -e "s,%NSPR_VERSION%,$NSPR_VERSION," \
54 -e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
55 -e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
56 $PKG/usr/lib/pkgconfig/nss.pc
987fdba5 57}