kind: manual
depends:
- core.bst
- network-security/nspr.bst
sources:
- kind: git
  url: upstream:nss
  track: baserock/nss-3.31
  ref: 711f0416e5f43f6514ad3c169080aed89054d44b
variables:
  notparallel: true
config:
  build-commands:
  - |
    case "%{arch}" in
        x86_64|ppc64)
            export USE_64=1;;
        *)
            ;;
    esac
    cd nss
    make BUILD_OPT=1                    \
    NSPR_INCLUDE_DIR=/usr/include/nspr  \
    USE_SYSTEM_ZLIB=1                   \
    ZLIB_LIBS=-lz                       \
    NSS_USE_SYSTEM_SQLITE=1
  install-commands:
  - install -d                                         "%{install-root}"/usr/lib/pkgconfig
  - install -v -m755 dist/Linux*/lib/*.so              "%{install-root}"/usr/lib
  - install -v -m644 dist/Linux*/lib/*.chk             "%{install-root}"/usr/lib
  - install -v -m644 dist/Linux*/lib/libcrmf.a         "%{install-root}"/usr/lib
  - install -v -m755 -d                                "%{install-root}"/usr/include/nss
  - cp -v -RL dist/public/nss/*                        "%{install-root}"/usr/include/nss
  - cp -v -RL dist/private/nss/*                       "%{install-root}"/usr/include/nss
  - chmod -v 644                                       "%{install-root}"/usr/include/nss/*
  - install -d                                         "%{install-root}"/usr/bin
  - install -v -m755 dist/Linux*/bin/certutil          "%{install-root}"/usr/bin
  - install -v -m755 dist/Linux*/bin/nss-config        "%{install-root}"/usr/bin
  - install -v -m755 dist/Linux*/bin/pk12util          "%{install-root}"/usr/bin
  - install -v -m644 dist/Linux*/lib/pkgconfig/nss.pc  "%{install-root}"/usr/lib/pkgconfig
