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