forked from curl/curl-for-win
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathosslsigncode.sh
executable file
·43 lines (34 loc) · 986 Bytes
/
osslsigncode.sh
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
#!/bin/sh -x
# Copyright 2016-2019 Viktor Szakats <https://vsz.me/>
# See LICENSE.md
export _NAM
export _VER
_NAM="$(basename "$0")"
_NAM="$(echo "${_NAM}" | cut -f 1 -d '.')"
_VER="$1"
(
cd "${_NAM}" || exit 0
# Detect host OS
case "$(uname)" in
*_NT*) os='win';;
Linux*) os='linux';;
Darwin*) os='mac';;
*BSD) os='bsd';;
esac
options=''
# curl only required to talk to the timestamp server which we don't
# use at the moment to remain deterministic.
# options="${options} -DENABLE_CURL -lcurl"
if [ "${os}" = 'mac' ]; then
# options="-I/usr/local/opt/curl/include -L/usr/local/opt/curl/lib"
options="${options} -I/usr/local/opt/openssl@1.1/include -L/usr/local/opt/openssl@1.1/lib"
fi
# shellcheck disable=SC2086
gcc -O3 \
osslsigncode.c -o ../osslsigncode-determ \
-DHAVE_SYS_MMAN_H \
${options} \
'-DPACKAGE_BUGREPORT="none"' \
"-DPACKAGE_STRING=\"osslsigncode ${_VER}-determfix\"" \
-lcrypto
)