Add libssh (#186)
Closes #158 Signed-off-by: nanake <nanake@users.noreply.github.com>
This commit is contained in:
parent
c406209c93
commit
843642ae9b
1 changed files with 41 additions and 0 deletions
41
scripts.d/50-libssh.sh
Executable file
41
scripts.d/50-libssh.sh
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCRIPT_REPO="https://git.libssh.org/projects/libssh.git"
|
||||||
|
SCRIPT_COMMIT="ac6d2fad4a8bf07277127736367e90387646363f"
|
||||||
|
|
||||||
|
ffbuild_enabled() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ffbuild_dockerbuild() {
|
||||||
|
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" libssh
|
||||||
|
cd libssh
|
||||||
|
|
||||||
|
mkdir build && cd build
|
||||||
|
|
||||||
|
if [[ $TARGET == win* ]]; then
|
||||||
|
export CFLAGS="$CFLAGS -Dgettimeofday=ssh_gettimeofday"
|
||||||
|
export CXXFLAGS="$CFLAGS -Dgettimeofday=ssh_gettimeofday"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DWITH_EXAMPLES=OFF -DWITH_SERVER=OFF \
|
||||||
|
-DWITH_SFTP=ON -DWITH_ZLIB=ON ..
|
||||||
|
|
||||||
|
ninja -j$(nproc)
|
||||||
|
ninja install
|
||||||
|
|
||||||
|
{
|
||||||
|
echo "Requires.private: libssl libcrypto zlib"
|
||||||
|
echo "Cflags.private: -DLIBSSH_STATIC"
|
||||||
|
} >> "$FFBUILD_PREFIX"/lib/pkgconfig/libssh.pc
|
||||||
|
}
|
||||||
|
|
||||||
|
ffbuild_configure() {
|
||||||
|
echo --enable-libssh
|
||||||
|
}
|
||||||
|
|
||||||
|
ffbuild_unconfigure() {
|
||||||
|
echo --disable-libssh
|
||||||
|
}
|
Loading…
Reference in a new issue