Files
haikuports/net-libs/libssh/libssh-0.8.3.recipe
2018-09-22 13:26:45 -04:00

118 lines
2.7 KiB
Bash

SUMMARY="A SSH2 library"
DESCRIPTION="libssh is a multiplatform C library implementing the SSHv2 \
protocol on client and server side. With libssh, you can remotely execute \
programs, transfer files, use a secure and transparent tunnel, manage public \
keys and much more..."
HOMEPAGE="https://www.libssh.org/"
COPYRIGHT="1995 Tatu Ylonen
2000 Markus Friedl
2003-2014 Aris Adamantiadis
2006 Alexander Neundorf
2007 Daniel Gollub
2007-2018 Andreas Schneider
2012 Dmitriy Kuznetsov
2017 Sartura d.o.o.
2017 Jan-Lukas Wynen
2018 Anderson Toshiyuki Sasaki
2018 by Red Hat, Inc."
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://www.libssh.org/files/${portVersion%.*}/libssh-$portVersion.tar.xz"
CHECKSUM_SHA256="302f31f606f2368cd3ce77d7a69f7464c18eae176e73e59102e0524401bd29d0"
PATCHES="libssh-$portVersion.patchset"
ARCHITECTURES="?x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="?x86_gcc2 x86"
libVersion="4.7.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libssh$secondaryArchSuffix = $portVersion
lib:libssh$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
libssh${secondaryArchSuffix}_devel = $portVersion
devel:libssh$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libssh$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcmocka$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage libssh$secondaryArchSuffix \
"$libDir"/libssh.so.$libVersion
PATCH()
{
# keyfile torture test is currently broken
sed -i \
-e '/torture_threads_pki_rsa/d' \
-e '/torture_rand/d' \
-e '/torture_threads_init/d' \
-e '/torture_threads_buffer/d' \
-e '/torture_threads_crypto/d' \
tests/unittests/CMakeLists.txt || die
}
BUILD()
{
mkdir -p build; cd build
cmake .. \
-DUNIT_TESTING=ON \
-DWITH_STACK_PROTECTOR=OFF \
-DCMAKE_C_FLAGS="-Wno-return-type" \
-DLIB_INSTALL_DIR="$libDir" \
-DLIBEXEC_INSTALL_DIR="$libDir" \
-DDATA_INSTALL_DIR="$dataDir" \
-DDATA_INSTALL_PREFIX="$dataDir" \
-DHTML_INSTALL_DIR="$developDocDir" \
-DINCLUDE_INSTALL_DIR="$includeDir" \
-DINFO_INSTALL_DIR="$developDocDir" \
-DMAN_INSTALL_DIR="$manDir" \
$cmakeDirArgs
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLibs libssh
fixPkgconfig
# devel package
packageEntries devel \
"$developDir" \
"$libDir"/cmake
}
TEST()
{
cd build
make test
}