1 #!/bin/sh 2 # $NetBSD: mkpc,v 1.1 2013/01/18 17:56:11 christos Exp $ 3 4 getversion() { 5 (echo '#include <openssl/opensslv.h>'; echo OPENSSL_VERSION_TEXT) | 6 cpp | grep OpenSSL | tr -d \" 7 } 8 VERSION="$(getversion)" 9 10 sed -e "s/@VERSION@/${VERSION}/g" < "$1" 11 12 case "$1" 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 $1" 1>&2 30 exit 1 31 ;; 32 esac 33 34 cat << EOF > "$1" 35 # \$NetBSD: mkpc,v 1.1 2013/01/18 17:56:11 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