summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafał Babiarz <5783815+sauler@users.noreply.github.com>2021-12-15 18:26:23 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-20 10:43:47 -0800
commit196bd117439c210310c13858087a53b19d001f11 (patch)
tree5f9298466e1cab1d3f9af55d0b9a91e643a5156e
parentbdc028da1c2886ae2e168da14acea2ecdab15529 (diff)
downloadserenity-196bd117439c210310c13858087a53b19d001f11.zip
Ports: Add libssh2 port
-rw-r--r--Ports/AvailablePorts.md1
-rwxr-xr-xPorts/libssh2/package.sh23
2 files changed, 24 insertions, 0 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md
index 6e09c143ec..ea4fcd9676 100644
--- a/Ports/AvailablePorts.md
+++ b/Ports/AvailablePorts.md
@@ -87,6 +87,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`libpuffy`](libpuffy/) | libpuffy | 1.0 | https://github.com/ibara/libpuffy |
| [`libsixel`](libsixel/) | libsixel | 1.8.6 | https://github.com/saitoha/libsixel |
| [`libsodium`](libsodium/) | libsodium | 1.0.18 | https://doc.libsodium.org/ |
+| [`libssh2`](libssh2/) | libssh2 | 1.10.0 | https://www.libssh2.org/ |
| [`libtheora`](libtheora/) | libtheora | 1.1.1 | https://www.theora.org/ |
| [`libtiff`](libtiff/) | libtiff | 4.2.0 | http://www.libtiff.org/ |
| [`libtool`](libtool/) | libtool | 2.4 | https://www.gnu.org/software/libtool/ |
diff --git a/Ports/libssh2/package.sh b/Ports/libssh2/package.sh
new file mode 100755
index 0000000000..0684cc86bd
--- /dev/null
+++ b/Ports/libssh2/package.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port=libssh2
+version=1.10.0
+useconfigure=true
+files="https://www.libssh2.org/download/libssh2-${version}.tar.gz libssh2-${version}.tar.gz
+https://www.libssh2.org/download/libssh2-${version}.tar.gz.asc libssh2-${version}.tar.gz.asc"
+depends=("libgcrypt")
+auth_type="sig"
+auth_import_key="27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2"
+auth_opts=("libssh2-${version}.tar.gz.asc" "libssh2-${version}.tar.gz")
+configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" "-GNinja")
+
+configure() {
+ run cmake "${configopts[@]}" .
+}
+
+build() {
+ run ninja
+}
+
+install() {
+ run ninja install
+}