1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/nss/nss.conf
3 # Copyright (C) 2008 - 2024 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 ---
17 includedir=$includedir/nss
19 var_remove_regex GCC_WRAPPER_REMOVE ' ' '-march.*'
20 var_remove_regex GCC_WRAPPER_INSERT ' ' '-march=.*'
22 var_remove_regex makeopt ' ' 'AR=.*'
23 var_append makeopt ' ' 'AS=$CC'
25 var_append makeopt ' ' 'BUILD_OPT=1'
26 [ $arch_sizeof_char_p = 8 ] && var_append makeopt ' ' 'USE_64=1'
28 var_append makeopt ' ' 'NSPR_INCLUDE_DIR=$root/usr/include/nspr'
29 var_append makeopt ' ' 'USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz'
30 var_append makeopt ' ' 'NSS_USE_SYSTEM_SQLITE=1'
31 var_append makeopt ' ' 'NSS_DISABLE_GTESTS=1'
33 if atstage cross; then
34 hook_add premake 5 '$MAKE -C coreconf/nsinstall CC=cc'
35 var_append makeopt ' ' 'NSINSTALL=$(echo $PWD/coreconf/nsinstall/*_cc_*OBJ/nsinstall)'
42 cp -L */lib/*.so $root$libdir
43 #cp -L */lib/*.chk $root$libdir
45 cp -L */lib/*.a $root$libdir
46 cp -L {public,private}/nss/*.h $root$includedir
48 install -v -m755 */bin/{certutil,pk12util} $root$bindir
50 NSS_VMAJOR=`grep "#define.*NSS_VMAJOR" public/nss/nss.h | awk '{print $3}'`
51 NSS_VMINOR=`grep "#define.*NSS_VMINOR" public/nss/nss.h | awk '{print $3}'`
52 NSS_VPATCH=`grep "#define.*NSS_VPATCH" public/nss/nss.h | awk '{print $3}'`
54 sed -e "s,@libdir@,$libdir,g" \
55 -e "s,@prefix@,/$prefix,g" \
56 -e "s,@exec_prefix@,\$\{prefix},g" \
57 -e "s,@includedir@,\$\{prefix}/include/nss,g" \
58 -e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \
59 -e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \
60 -e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \
61 $confdir/nss-config.in > ${root}${bindir}/nss-config
62 chmod 755 $root$bindir/nss-config
64 sed -e "s,@libdir@,$libdir,g" \
65 -e "s,@prefix@,/$prefix,g" \
66 -e "s,@exec_prefix@,\$\{prefix},g" \
67 -e "s,@includedir@,\$\{prefix}/include/nss," \
68 -e "s,@NSPR_VERSION@,`nspr-config --version`,g" \
69 -e "s,@NSS_VERSION@,$NSS_VMAJOR.$NSS_VMINOR.$NSS_VPATCH,g" \
70 $confdir/nss.pc.in > ${root}$(pkgprefix libdir pkgconfig)/pkgconfig/nss.pc
71 chmod 644 $root$(pkgprefix libdir pkgconfig)/pkgconfig/nss.pc
73 hook_add postmake 5 nss_install