50-libssh.sh 916 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. SCRIPT_REPO="https://gitlab.com/libssh/libssh-mirror.git"
  3. SCRIPT_COMMIT="861590192fed3627e80605be080f79aa2678a005"
  4. ffbuild_enabled() {
  5. return 0
  6. }
  7. ffbuild_dockerbuild() {
  8. mkdir build && cd build
  9. cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
  10. -DBUILD_SHARED_LIBS=OFF -DWITH_EXAMPLES=OFF -DWITH_SERVER=OFF -DWITH_SFTP=ON -DWITH_ZLIB=ON \
  11. ..
  12. ninja -j$(nproc)
  13. ninja install
  14. {
  15. echo "Requires.private: libssl libcrypto zlib"
  16. echo "Cflags.private: -DLIBSSH_STATIC"
  17. if [[ $TARGET == win* ]]; then
  18. echo "Libs.private: -liphlpapi -lws2_32"
  19. fi
  20. echo "Libs.private: -lpthread"
  21. } >> "$FFBUILD_PREFIX"/lib/pkgconfig/libssh.pc
  22. }
  23. ffbuild_configure() {
  24. echo --enable-libssh
  25. }
  26. ffbuild_unconfigure() {
  27. echo --disable-libssh
  28. }