1
0
Fork 0

Adding upstream version 2.10.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:27:28 +01:00
parent 1e65f355a3
commit 24ce361c7c
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
530 changed files with 12276 additions and 4877 deletions

View file

@ -21,6 +21,9 @@ usage() {
echo " cross use cross toolchain to build"
echo " coverage build coverage report"
echo " appimage build AppImage target"
echo " distro build libnvme and nvme-cli separately"
echo " docs build documentation"
echo " static build a static binary"
echo ""
echo "configs with muon:"
echo " [default] minimal static build"
@ -115,6 +118,25 @@ config_meson_appimage() {
"${BUILDDIR}"
}
config_meson_docs() {
CC="${CC}" "${MESON}" setup \
-Ddocs=all \
-Ddocs-build=true \
--force-fallback-for=libnvme \
-Dlibnvme:werror=false \
"${BUILDDIR}"
}
config_meson_static() {
CC="${CC}" "${MESON}" setup \
--buildtype=release \
--default-library=static \
--wrap-mode=forcefallback \
-Dc_link_args="-static" \
-Dlibnvme:keyutils=disabled \
"${BUILDDIR}"
}
build_meson() {
"${MESON}" compile \
-C "${BUILDDIR}"
@ -205,6 +227,51 @@ test_muon() {
ldd "${BUILDDIR}/nvme" 2>&1 | grep 'not a dynamic executable' || exit 1
}
_install_libnvme() {
local libnvme_ref=$(sed -n "s/revision = \([0-9a-z]\+\)/\1/p" subprojects/libnvme.wrap)
local LBUILDDIR="${BUILDDIR}/.build-libnvme"
mkdir -p "${BUILDDIR}/libnvme"
pushd "${BUILDDIR}/libnvme"
git init
git remote add origin https://github.com/linux-nvme/libnvme.git
git fetch origin ${libnvme_ref}
git reset --hard FETCH_HEAD
CC="${CC}" "${MESON}" setup \
--prefix="${BUILDDIR}/usr" \
--buildtype="${BUILDTYPE}" \
"${LBUILDDIR}"
"${MESON}" compile \
-C "${LBUILDDIR}"
"${MESON}" install \
-C "${LBUILDDIR}"
popd || exit 1
}
config_meson_distro() {
_install_libnvme
PKG_CONFIG_PATH="${BUILDDIR}/usr/lib64/pkgconfig" \
CC="${CC}" ${MESON} setup \
--prefix="${BUILDDIR}/usr" \
--werror \
--buildtype="${BUILDTYPE}" \
"${BUILDDIR}"
}
build_meson_distro() {
build_meson
}
test_meson_distro() {
test_meson
}
if [[ "${BUILDTOOL}" == "muon" ]]; then
SAMU="$(which samu 2> /dev/null)" || true
if [[ -z "${SAMU}" ]]; then