/crypto/external/bsd/openssl/mkpc

http://www.minix3.org/ · Shell · 48 lines · 43 code · 3 blank · 2 comment · 0 complexity · 040dd0869fb01a499519b2e87468961e MD5 · raw file

  1. #!/bin/sh
  2. # $NetBSD: mkpc,v 1.4 2014/07/07 09:14:43 joerg Exp $
  3. getversion() {
  4. (echo '#include "opensslv.h"'; echo OPENSSL_VERSION_TEXT) |
  5. $CPP $CPPFLAGS -I$1 | grep OpenSSL | cut -d ' ' -f 2
  6. }
  7. VERSION="$(getversion $1)"
  8. sed -e "s/@VERSION@/${VERSION}/g" < "$2"
  9. case "$2" in
  10. libcrypto.pc)
  11. NAME="OpenSSL-libcrypto"
  12. LIBS="-lcrypto"
  13. DESCRIPTION="OpenSSL cryptography library"
  14. ;;
  15. libssl.pc)
  16. NAME="OpenSSL"
  17. LIBS="-lssl -lcrypto"
  18. DESCRIPTION="Secure Sockets Layer and cryptography libraries"
  19. ;;
  20. openssl.pc)
  21. NAME="OpenSSL"
  22. LIBS="-lssl -lcrypto"
  23. DESCRIPTION="Sockets Layer and cryptography libraries and tools"
  24. ;;
  25. *)
  26. echo "$0: I don't know about $2" 1>&2
  27. exit 1
  28. ;;
  29. esac
  30. cat << EOF > "$2"
  31. # \$NetBSD: mkpc,v 1.4 2014/07/07 09:14:43 joerg Exp $
  32. prefix=/usr
  33. exec_prefix=/usr
  34. libdir=/usr/lib
  35. includedir=/usr/include
  36. Name: ${NAME}
  37. Description: ${DESCRIPTION}
  38. Version: ${VERSION}
  39. Requires:
  40. Libs: ${LIBS}
  41. Libs.private:
  42. Cflags:
  43. EOF