From 381654dfaacf3501172a164eaacdd03eac2f2c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 25 Nov 2023 02:26:30 +0100 Subject: [PATCH] Add NBDKit --- sys-block/nbdkit/nbdkit-1.36.1.recipe | 87 +++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sys-block/nbdkit/nbdkit-1.36.1.recipe diff --git a/sys-block/nbdkit/nbdkit-1.36.1.recipe b/sys-block/nbdkit/nbdkit-1.36.1.recipe new file mode 100644 index 000000000..ebaecb09b --- /dev/null +++ b/sys-block/nbdkit/nbdkit-1.36.1.recipe @@ -0,0 +1,87 @@ +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="1" +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//, 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 +}