summaryrefslogtreecommitdiff
path: root/crypto/external/bsd/openssl.old/mkpc
blob: fa370432b3c7864a2a81241f5ef9bc3f74a8b1db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
#	$NetBSD: mkpc,v 1.3 2023/04/18 14:24:25 christos Exp $

getversion() {
	(echo '#include "openssl/opensslv.h"'; echo OPENSSL_VERSION_TEXT) |
	    eval "$CPP $CPPFLAGS" -I$1 | grep OpenSSL | cut -d ' ' -f 2
}
VERSION="$(getversion $1)"

sed -e "s/@VERSION@/${VERSION}/g" < "$2"

case "$2" in
libcrypto.pc)
	NAME="OpenSSL-libcrypto"
	LIBS="-lcrypto"
	DESCRIPTION="OpenSSL cryptography library"
	;;
libssl.pc)
	NAME="OpenSSL"
	LIBS="-lssl -lcrypto"
	DESCRIPTION="Secure Sockets Layer and cryptography libraries"
	;;
openssl.pc)
	NAME="OpenSSL"
	LIBS="-lssl -lcrypto"
	DESCRIPTION="Sockets Layer and cryptography libraries and tools"
	;;
*)
	echo "$0: I don't know about $2" 1>&2
	exit 1
	;;
esac

cat << EOF > "$2"
# \$NetBSD: mkpc,v 1.3 2023/04/18 14:24:25 christos Exp $
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include

Name: ${NAME}
Description: ${DESCRIPTION}
Version: ${VERSION}
Requires: 
Libs: ${LIBS}
Libs.private:
Cflags:
EOF