mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 00:00:07 +02:00
82 lines
1.9 KiB
Bash
82 lines
1.9 KiB
Bash
SUMMARY="SMB2/3 userspace client"
|
|
DESCRIPTION="Libsmb2 is a userspace client library for accessing SMB2/SMB3 \
|
|
shares on a network.
|
|
It is high performance and fully async. It supports both zero-copy \
|
|
for SMB READ/WRITE commands as well as compounded commands."
|
|
HOMEPAGE="https://github.com/sahlberg/libsmb2"
|
|
COPYRIGHT="2020 Ronnie Sahlberg"
|
|
LICENSE="GNU LGPL v2.1"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/sahlberg/libsmb2/archive/refs/tags/v${portVersion}.tar.gz"
|
|
CHECKSUM_SHA256="b4d1b13bc07adc68379a72f723b9032a950afd62fed7f2aa3e57f3421406da11"
|
|
PATCHES="libsmb2-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
libsmb2$secondaryArchSuffix = $portVersion
|
|
lib:libsmb2$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libsmb2${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libsmb2$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
libsmb2$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libssl$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
|
|
defineDebugInfoPackage libsmb2$secondaryArchSuffix \
|
|
$libDir/libsmb2.so.$libVersion
|
|
|
|
BUILD()
|
|
{
|
|
cmake -B build -S . \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DCMAKE_C_FLAGS="-DB_USE_POSITIVE_POSIX_ERRORS" \
|
|
-DCMAKE_EXE_LINKER_FLAGS="-lposix_error_mapper -lnetwork" \
|
|
-DINSTALL_CMAKE_DIR=$libDir/cmake \
|
|
-DINSTALL_LIB_DIR=$libDir \
|
|
-DINSTALL_INC_DIR=$includeDir \
|
|
-DINSTALL_PKGCONFIG_DIR=$libDir/pkgconfig
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
prepareInstalledDevelLib libsmb2
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir \
|
|
$libDir/cmake
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
true
|
|
# make -C build test # no tests provided
|
|
}
|