Skip to content

Commit

Permalink
Add LibSSH2 v1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Jan 8, 2019
1 parent e4236a7 commit 60a0f47
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions LibSSH2/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using BinaryBuilder

name = "LibSSH2"
version = v"1.8.0"

# Collection of sources required to build Ogg
sources = [
"https://github.com/libssh2/libssh2/releases/download/libssh2-$(version)/libssh2-$(version).tar.gz" =>
"39f34e2f6835f4b992cafe8625073a88e5a28ba78f83e8099610a7b3af4676d4",
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/libssh2*/
BUILD_FLAGS=(
-DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS=ON
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
-DENABLE_ZLIB_COMPRESSION=OFF
"-DCMAKE_INSTALL_PREFIX=${prefix}"
"-DCMAKE_TOOLCHAIN_FILE=/opt/$target/$target.toolchain"
)
if [[ ${target} == *mingw* ]]; then
BUILD_FLAGS+=(-DCRYPTO_BACKEND=WinCNG)
else
BUILD_FLAGS+=(-DCRYPTO_BACKEND=mbedTLS)
fi
mkdir build
cd build
cmake .. "${BUILD_FLAGS[@]}"
make -j${nproc}
make install
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()

# The products that we will ensure are always built
products = prefix -> [
LibraryProduct(prefix, "libssh2", :libssh2),
]

# Dependencies that must be installed before this package can be built
dependencies = [
"https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/v0.16.0/build_MbedTLS.v2.13.1.jl",
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)

0 comments on commit 60a0f47

Please sign in to comment.