X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fnss;h=cddbc5e24f85b0d5826890189866f6ee97af58d3;hb=3a7d016a0246156de63a6f98bbf5be2e95230060;hp=41f8a9c7afcd99f4a05bec935ce2f9981d180c07;hpb=3dae4c554ec18f465eb6ee5e6efdbdbe8557e13c;p=hvlinux.git diff --git a/stage5/pkg/nss b/stage5/pkg/nss index 41f8a9c..cddbc5e 100644 --- a/stage5/pkg/nss +++ b/stage5/pkg/nss @@ -1,63 +1,27 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -# Define to 1 to test this package. -RUN_TESTS=0 - -cd ${LFS_TMP}/${1} -export WORKINGDIR=${PWD} - -# Non-debug optimized build -export BUILD_OPT=1 - -cd mozilla/security/nss -make nss_build_all - -cd ../.. - -export NSS_LINUXDIR=$(basename `ls -d $WORKINGDIR/mozilla/dist/Linux*`) - -if [ ${RUN_TESTS} -eq 1 ]; then - # Running tests - export DOMSUF="${DOMAIN}" - export PATH=$PATH:$WORKINGDIR/mozilla/dist/$NSS_LINUXDIR/bin - export TEST_RESULTSDIR=$WORKINGDIR/mozilla/tests_results/security - cd security/nss/tests - sed -i 's/gmake/make/' common/init.sh - ./all.sh - TEST_RESULTS=$(grep Passed $TEST_RESULTSDIR/$(hostname --short).1/results.html | wc -l) - if [ ${TEST_RESULTS} -ne 770 ]; then - echo "Number of tests that passed: ${TEST_RESULTS}" - echo "Number of tests expected to pass: 770" - exit 1 - fi -fi - -cd ${LFS_TMP}/${1}/mozilla -install -v -m755 nsprpub/$NSS_LINUXDIR/config/nspr-config /usr/bin -#install -v -m755 -d /usr/lib/pkgconfig -#install -v -m644 nsprpub/lib/pkgconfig/nspr.pc \ -# security/nss/lib/pkgconfig/nss.pc \ -# /usr/lib/pkgconfig - -cd dist -install -v -m755 $NSS_LINUXDIR/lib/*.so /usr/lib -install -v -m644 $NSS_LINUXDIR/lib/{*.chk,libcrmf.a} /usr/lib -install -v -m755 -d /usr/include/{nss,nspr} -install -v -m644 {public,private}/nss/* /usr/include/nss -cp -v -RL $NSS_LINUXDIR/include/* /usr/include/nspr -chmod -v 644 /usr/include/nspr/prvrsion.h - -ldconfig - -exit $? +#!/bin/bash + +hvbuild() +{ + cd ${SRC_DIR}/nss + + # This package does not support parallel build + make BUILD_OPT=1 \ + NSPR_INCLUDE_DIR=/usr/include/nspr \ + USE_SYSTEM_ZLIB=1 \ + ZLIB_LIBS=-lz \ + $([ $(uname -m) = x86_64 ] && echo USE_64=1) \ + $([ -f /usr/include/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1) +} + +hvbuild_post() +{ + cd ${SRC_DIR}/dist + + install -v -m755 Linux*/lib/*.so /usr/lib + install -v -m644 Linux*/lib/{*.chk,libcrmf.a} /usr/lib + install -v -m755 -d /usr/include/nss + cp -v -RL {public,private}/nss/* /usr/include/nss + chmod 644 /usr/include/nss/* + install -v -m755 Linux*/bin/{certutil,nss-config,pk12util} /usr/bin + install -v -m644 Linux*/lib/pkgconfig/nss.pc /usr/lib/pkgconfig +}