1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/nss/nss.conf
3 # Copyright (C) 2008 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
13 includedir=$includedir/nss
17 var_remove GCC_WRAPPER_REMOVE ' ' '-march*'
18 var_remove_regex GCC_WRAPPER_INSERT ' ' '-march=.*'
22 var_append makeopt ' ' 'BUILD_OPT=1'
23 [ $arch_sizeof_char_p = 8 ] && var_append makeopt ' ' 'USE_64=1'
25 var_append makeopt ' ' 'NSPR_INCLUDE_DIR=$root/usr/include/nspr'
26 var_append makeopt ' ' 'USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz'
27 var_append makeopt ' ' 'NSS_USE_SYSTEM_SQLITE=1'
30 # install libs and header files
32 cp -L */lib/*.so $root$libdir
33 cp -L */lib/*.chk $root$libdir
34 cp -L */lib/*.a $root$libdir
35 cp -L {public,private}/nss/*.h $root$includedir
37 install -v -m755 */bin/{certutil,pk12util} $root$bindir
38 cp $confdir/nss-config.in ${root}${bindir}/nss-config
39 cp $confdir/nss.pc.in ${root}$(pkgprefix libdir pkgconfig)/pkgconfig/nss.pc
40 chmod 755 ${root}${bindir}/nss-config
41 chmod 644 ${root}$(pkgprefix libdir pkgconfig)/pkgconfig/nss.pc
43 NSS_VMAJOR=`cat nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}'`
44 NSS_VMINOR=`cat nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}'`
45 NSS_VPATCH=`cat nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}'`
47 sed -e "s,@libdir@,$libdir,g" \
48 -e "s,@prefix@,/$prefix,g" \
49 -e "s,@exec_prefix@,\$\{prefix},g" \
50 -e "s,@includedir@,\$\{prefix}/include/nss,g" \
51 -e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \
52 -e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \
53 -e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \
54 -i ${root}${bindir}/nss-config
56 sed -e "s,@libdir@,$libdir,g" \
57 -e "s,@prefix@,/$prefix,g" \
58 -e "s,@exec_prefix@,\$\{prefix},g" \
59 -e "s,@includedir@,\$\{prefix}/include/nss," \
60 -e "s,@NSPR_VERSION@,`nspr-config --version`,g" \
61 -e "s,@NSS_VERSION@,$NSS_VMAJOR.$NSS_VMINOR.$NSS_VPATCH,g" \
62 -i ${root}$(pkgprefix libdir pkgconfig)/pkgconfig/nss.pc