Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # $OpenBSD: Makefile,v 1.76 2017/05/30 18:57:01 ajacoutot Exp $
  2. COMMENT= libraries to support development of security-enabled apps
  3. VERSION= 3.30.2
  4. DISTNAME= nss-${VERSION}
  5. REVISION= 0
  6. SO_VERSION= 47.0
  7. .for _lib in freebl3 nss3 nssckbi nssdbm3 nssutil3 smime3 softokn3 ssl3
  8. SHARED_LIBS+= ${_lib} ${SO_VERSION}
  9. .endfor
  10. CATEGORIES= security
  11. MAINTAINER= Landry Breuil <landry@openbsd.org>
  12. HOMEPAGE= https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
  13. # mozilla public license
  14. PERMIT_PACKAGE_CDROM= Yes
  15. #for regular releases
  16. MASTER_SITES= http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${DISTNAME:U:C/[-.]/_/g}_RTM/src/
  17. LIB_DEPENDS= databases/sqlite3 \
  18. devel/nspr>=4.12
  19. WANTLIB += c pthread z nspr4 plc4 plds4 sqlite3>=22
  20. MAKE_ENV= BUILD_OPT=1 \
  21. LOCALBASE="${LOCALBASE}" \
  22. NSS_ENABLE_ECC=1 \
  23. NSS_ENABLE_TLS_1_3=1 \
  24. NSS_DISABLE_GTESTS=1 \
  25. NSS_USE_SYSTEM_SQLITE=1 \
  26. SO_VERSION="${SO_VERSION}" \
  27. XCFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \
  28. NSPR_INCLUDE_DIR="${LOCALBASE}/include/nspr" \
  29. NSPR_LIB_DIR="${LOCALBASE}/lib"
  30. USE_GMAKE= Yes
  31. WRKSRC= ${WRKDIST}/nss
  32. NSSDIST= ${WRKDIST}/dist
  33. NSSOBJ= ${NSSDIST}/OpenBSD`uname -r`${OBJ64}_OPT.OBJ
  34. ALL_TARGET= nss_build_all
  35. SUBST_VARS += VERSION
  36. # Don't forget to sync these with http://wiki.mozilla.org/NSS:ToolsToShip
  37. MAIN_TOOLS= certutil modutil pk12util signtool ssltap crlutil \
  38. cmsutil signver
  39. do-install:
  40. ${INSTALL_DATA_DIR} ${PREFIX}/include/nss
  41. ${INSTALL_DATA_DIR} ${PREFIX}/lib/pkgconfig
  42. ${INSTALL_DATA} ${NSSDIST}/public/nss/*.{h,api} ${PREFIX}/include/nss/
  43. ${INSTALL_DATA} ${NSSOBJ}/lib/*.so.${SO_VERSION} ${PREFIX}/lib/
  44. ${INSTALL_DATA} ${NSSOBJ}/lib/{libcrmf.a,*.chk} ${PREFIX}/lib/
  45. cd ${NSSOBJ}/bin && ${INSTALL_PROGRAM} ${MAIN_TOOLS} ${PREFIX}/bin/
  46. ${SUBST_CMD} -m 0644 -c ${FILESDIR}/nss.pc \
  47. ${PREFIX}/lib/pkgconfig/nss.pc \
  48. ${FILESDIR}/nss-config ${PREFIX}/bin/nss-config
  49. chown ${BINOWN}:${BINGRP} ${PREFIX}/{bin/nss-config,lib/pkgconfig/nss.pc}
  50. chmod +x ${PREFIX}/bin/nss-config
  51. do-test:
  52. cd ${WRKSRC}/tests && ${SETENV} ${MAKE_ENV} \
  53. PATH="${NSSOBJ}/bin:${PATH}" \
  54. LD_LIBRARY_PATH="${NSSOBJ}/lib" /bin/sh ./all.sh
  55. .include <bsd.port.arch.mk>
  56. .if ${PROPERTIES:Mlp64}
  57. MAKE_ENV+= USE_64=1
  58. OBJ64= _64
  59. .endif
  60. .include <bsd.port.mk>