summaryrefslogtreecommitdiff
path: root/src/lib/libssl/generate_pkgconfig.sh
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2021-08-18 16:06:57 +0000
committercvs2svn <admin@example.com>2021-08-18 16:06:57 +0000
commitd56c8fa8260d226f98b26f017b45b9c2b135f38d (patch)
tree348178b41617813cc93787187984a734ef8379ca /src/lib/libssl/generate_pkgconfig.sh
parent18b9c1bcab7c37d8c5bd05b8e0d14d0c59d96650 (diff)
downloadopenbsd-tb_20210818.tar.gz
openbsd-tb_20210818.tar.bz2
openbsd-tb_20210818.zip
This commit was manufactured by cvs2git to create tag 'tb_20210818'.tb_20210818
Diffstat (limited to 'src/lib/libssl/generate_pkgconfig.sh')
-rw-r--r--src/lib/libssl/generate_pkgconfig.sh88
1 files changed, 0 insertions, 88 deletions
diff --git a/src/lib/libssl/generate_pkgconfig.sh b/src/lib/libssl/generate_pkgconfig.sh
deleted file mode 100644
index 4bc22c3267..0000000000
--- a/src/lib/libssl/generate_pkgconfig.sh
+++ /dev/null
@@ -1,88 +0,0 @@
1#!/bin/sh
2#
3# $OpenBSD: generate_pkgconfig.sh,v 1.10 2021/06/08 11:19:39 inoguchi Exp $
4#
5# Copyright (c) 2010,2011 Jasper Lievisse Adriaanse <jasper@openbsd.org>
6#
7# Permission to use, copy, modify, and distribute this software for any
8# purpose with or without fee is hereby granted, provided that the above
9# copyright notice and this permission notice appear in all copies.
10#
11# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18#
19# Generate pkg-config files for OpenSSL.
20
21usage() {
22 echo "usage: ${0##*/} -c current_directory -o obj_directory"
23 exit 1
24}
25
26curdir=
27objdir=
28while getopts "c:o:" flag; do
29 case "$flag" in
30 c)
31 curdir=$OPTARG
32 ;;
33 o)
34 objdir=$OPTARG
35 ;;
36 *)
37 usage
38 ;;
39 esac
40done
41
42[ -n "${curdir}" ] || usage
43if [ ! -d "${curdir}" ]; then
44 echo "${0##*/}: ${curdir}: not found"
45 exit 1
46fi
47[ -n "${objdir}" ] || usage
48if [ ! -w "${objdir}" ]; then
49 echo "${0##*/}: ${objdir}: not found or not writable"
50 exit 1
51fi
52
53version_re="s/^#define[[:blank:]]+SHLIB_VERSION_NUMBER[[:blank:]]+\"(.*)\".*/\1/p"
54version_file=${curdir}/../libcrypto/opensslv.h
55lib_version=$(sed -nE ${version_re} ${version_file})
56
57# Put -I${includedir} into Cflags so configure script tests like
58# test -n "`pkg-config --cflags openssl`"
59# don't assume that OpenSSL isn't available.
60
61pc_file="${objdir}/libssl.pc"
62cat > ${pc_file} << __EOF__
63prefix=/usr
64exec_prefix=\${prefix}
65libdir=\${exec_prefix}/lib
66includedir=\${prefix}/include
67
68Name: OpenSSL-libssl
69Description: Secure Sockets Layer and cryptography libraries
70Version: ${lib_version}
71Requires.private: libcrypto
72Libs: -L\${libdir} -lssl
73Cflags: -I\${includedir}
74__EOF__
75
76
77pc_file="${objdir}/openssl.pc"
78cat > ${pc_file} << __EOF__
79prefix=/usr
80exec_prefix=\${prefix}
81libdir=\${exec_prefix}/lib
82includedir=\${prefix}/include
83
84Name: OpenSSL
85Description: Secure Sockets Layer and cryptography libraries and tools
86Version: ${lib_version}
87Requires: libssl libcrypto
88__EOF__