mkpc revision 1.1
1#!/bin/sh
2#	$NetBSD: mkpc,v 1.1 2013/01/18 17:56:11 christos Exp $
3
4getversion() {
5	(echo '#include <openssl/opensslv.h>'; echo OPENSSL_VERSION_TEXT) |
6	    cpp | grep OpenSSL | tr -d \"
7}
8VERSION="$(getversion)"
9
10sed -e "s/@VERSION@/${VERSION}/g" < "$1"
11
12case "$1" in
13libcrypto.pc)
14	NAME="OpenSSL-libcrypto"
15	LIBS="-lcrypto"
16	DESCRIPTION="OpenSSL cryptography library"
17	;;
18libssl.pc)
19	NAME="OpenSSL"
20	LIBS="-lssl -lcrypto"
21	DESCRIPTION="Secure Sockets Layer and cryptography libraries"
22	;;
23openssl.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	;;
32esac
33
34cat << EOF > "$1"
35# \$NetBSD: mkpc,v 1.1 2013/01/18 17:56:11 christos Exp $
36prefix=/usr
37exec_prefix=/usr
38libdir=/usr/lib
39includedir=/usr/include
40
41Name: ${NAME}
42Description: ${DESCRIPTION}
43Version: ${VERSION}
44Requires: 
45Libs: ${LIBS}
46Libs.private:
47Cflags:
48EOF
49