CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
nspr: updated to 4.34.1
[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.80
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 $SRC/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 USE_SYSTEM_ZLIB=1
22 export NSS_ENABLE_ECC=1
23 export NSS_ENABLE_TLS_1_3=1
24 export BUILD_OPT=1
25 export NSS_ENABLE_WERROR=0
26 export NSS_DISABLE_GTESTS=1
27
28 make -C nss
29
30 install -d $PKG/usr/{bin,lib/pkgconfig,include/nss/private}
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 libfreebl.a *.chk
37 cd ../../public/nss
38 install -t "$PKG/usr/include/nss" -m644 *.h
39 cd ../../private/nss
40 install -t "$PKG/usr/include/nss/private" -m644 blapi.h alghmac.h
41 install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config
42
43 _version=$(printf "%i.%i.%i" ${version//./ })
44 sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
45
46 NSS_LIBS=`$PKG/usr/bin/nss-config --libs`
47 NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags`
48 NSPR_VERSION=`pkg-config --modversion nspr`
49 for module in nss; do
50 sed $SRC/$module.pc.in \
51 -e "s,%libdir%,/usr/lib," \
52 -e "s,%prefix%,/usr," \
53 -e "s,%exec_prefix%,/usr/bin," \
54 -e "s,%includedir%,/usr/include/nss," \
55 -e "s,%NSS_VERSION%,$version," \
56 -e "s,%NSPR_VERSION%,$NSPR_VERSION," \
57 -e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
58 -e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
59 $PKG/usr/lib/pkgconfig/$module.pc
60 done
61 }