summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2022-11-20 18:02:13 +0900
committerRyo Nakamura <upa@haeena.net>2022-11-20 18:03:56 +0900
commite22bc5523b25bd23cde1c47dfe9b567ca7145221 (patch)
tree43e56bf2fc7cfbe2a7b13a745f8c8b66a44910e5 /scripts
parentb6b283f8b5f5803af4be765788d873d837154f73 (diff)
fix CPACK build dependency
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-build-deps.sh28
-rwxr-xr-xscripts/print-install-deps.sh23
2 files changed, 43 insertions, 8 deletions
diff --git a/scripts/install-build-deps.sh b/scripts/install-build-deps.sh
index 0d7bd94..fa16b55 100755
--- a/scripts/install-build-deps.sh
+++ b/scripts/install-build-deps.sh
@@ -1,18 +1,30 @@
-#!/bin/bash -e
+#!/bin/bash -eu
#
# Install build dpenedencies.
-source /etc/os-release
+platform=$(uname -s)
+
+if [ -e /etc/os-release ]; then
+ source /etc/os-release
+ platform=${platform}-${ID}
+fi
+
set -x
-case $ID in
- ubuntu*)
- apt-get install -y gcc make cmake libssh-dev
+case $platform in
+ Darwin)
+ brew install openssl
;;
- centos* | rhel* | rocky*)
- yum install -y gcc make cmake libssh-devel rpm-build
+ Linux-ubuntu*)
+ sudo apt-get install -y \
+ gcc make cmake zlib1g-dev libssl-dev libkrb5-dev
+ ;;
+ Linux-centos* | Linux-rhel* | Linux-rocky*)
+ sudo yum install -y \
+ gcc make cmake zlib-devel openssl-devel rpm-build
;;
*)
- echo "unsupported dependency install: $ID"
+ echo "unsupported platform: $platform"
exit 1
+ ;;
esac
diff --git a/scripts/print-install-deps.sh b/scripts/print-install-deps.sh
new file mode 100755
index 0000000..e0e2f09
--- /dev/null
+++ b/scripts/print-install-deps.sh
@@ -0,0 +1,23 @@
+#!/bin/bash -e
+#
+# Print install dpenedencies on Linux. CMake runs this script to obtain deps for CPACK.
+# mscp dependes on packages on which libssh depends.
+
+source /etc/os-release
+
+release=$1
+
+case $release in
+ ubuntu-20.04*)
+ echo "libc6 (>= 2.27), libgssapi-krb5-2 (>= 1.17), libssl1.1 (>= 1.1.1), zlib1g (>= 1:1.1.4)"
+ ;;
+ ubuntu-22.04*)
+ echo "libc6 (>= 2.33), libgssapi-krb5-2 (>= 1.17), libssl3 (>= 3.0.0~~alpha1), zlib1g (>= 1:1.1.4)"
+ ;;
+ centos* | rhel* | rocky*)
+ echo "glibc crypto-policies krb5-libs openssl-libs libcom_err"
+ ;;
+ *)
+ echo "unsupported install dependency: $release"
+ exit 1
+esac