Files
haikuports/sys-block/nbdkit/nbdkit-1.36.1.recipe
2025-01-30 10:53:41 +00:00

90 lines
2.3 KiB
Bash

SUMMARY="NBD server toolkit with stable ABI and permissive license"
DESCRIPTION="NBD - Network Block Device - is a protocol for accessing \
Block Devices (hard disks and disk-like things) over a Network.
nbdkit is a toolkit for creating NBD servers.
The key features are:
* Multithreaded NBD server written in C with good performance.
* Minimal dependencies for the basic server.
* Liberal license (BSD) allows nbdkit to be linked to proprietary
libraries or included in proprietary code.
* Well-documented, simple plugin API with a stable ABI guarantee.
Lets you export "unconventional" block devices easily.
* You can write plugins in C, Go, Lua, Perl, Python, OCaml, Ruby,
Rust, shell script or Tcl.
* Filters can be stacked in front of plugins to transform the output."
HOMEPAGE="https://gitlab.com/nbdkit/nbdkit/"
COPYRIGHT="2010-2020 Red Hat Inc."
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="https://libguestfs.org/download/nbdkit/${portVersion%.*}-stable/nbdkit-$portVersion.tar.gz"
#TODO: check if they fixed HTTPS
CHECKSUM_SHA256="6f6b8f37033944d1219659627f6f0af1db236d5965985981bc34d8d1b7ebc54a"
#SOURCE_DIR="v$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
fi
PROVIDES="
nbdkit$secondaryArchSuffix = $portVersion
cmd:nbdkit$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:liblzma$secondaryArchSuffix
lib:libssh$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:liblzma$secondaryArchSuffix
devel:libssh$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:automake
cmd:bash
cmd:gawk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl
cmd:sed
"
#TODO: fix python support
#TODO: enable other lang support (lua, perl, tcl, go, ocaml)
BUILD()
{
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
--disable-python
make $jobArgs
}
INSTALL()
{
make install
fixPkgconfig
}