#!/bin/bash # # Maintainer: Deposite Pirate source /usr/src/ports/Build/build.sh NAME=nss VERSION=3.14.3 NSPRVER=4.9.6 BUILD=1 DEPENDS=('libnspr >= 4.9.6-1' 'sqlite >= 3.7.16.1-1') OPTIONS="nostrip" # Description cat > ${PKG}/install/slack-desc < ${PKG}${SYS_DIR[share]}/pkgconfig/nss.pc ( cd ${PKG}${SYS_DIR[share]}/pkgconfig ln -sf nss.pc mozilla-nss.pc ) VERSFILE="mozilla/security/nss/lib/nss/nss.h" LIBMAJOR="$(grep "#define.*NSS_VMAJOR" ${VERSFILE} | awk '{print $3}')" LIBMINOR="$(grep "#define.*NSS_VMINOR" ${VERSFILE} | awk '{print $3}')" LIBPATCH="$(grep "#define.*NSS_VPATCH" ${VERSFILE} | awk '{print $3}')" sed nss-config.in \ -e "s|@prefix@|${SYS_DIR[usr]}|g" \ -e "s|@MOD_MAJOR_VERSION@|${LIBMAJOR}|g" \ -e "s|@MOD_MINOR_VERSION@|${LIBMINOR}|g" \ -e "s|@MOD_PATCH_VERSION@|${LIBPATCH}|g" \ > ${PKG}${SYS_DIR[bin]}/nss-config chmod 0755 ${PKG}${SYS_DIR[bin]}/nss-config strip ${PKG}${SYS_DIR[bin]}/* ( cd ${PKG}${SYS_DIR[lib]} install.dir nostrip for file in *.chk; do library="${file%.chk}.so" mv ${library} nostrip done strip --strip-unneeded ${PKG}${SYS_DIR[lib]}/*.so* mv nostrip/*.so . rm -rf nostrip ) }