kiss-mfavila-small/community-mod/stable/nvme-cli/build
2021-07-28 18:38:44 +00:00

17 lines
423 B
Bash
Executable File

#!/bin/sh -e
# Makefile uses a flag which is incompatible with busybox.
sed -i 's/644 -T/644 /g' Makefile
# Build is broken with GCC 11
sed -i '/<dirent.h>/a #include <limits.h>' nvme.h
make
make PREFIX=/usr SBINDIR=/usr/bin DESTDIR="$1" install
# Remove systemd, dracut and autocompletion files
rm -rf "$1/usr/lib"
rm -rf "$1/etc/udev"
rm -rf "$1/usr/share/zsh"
rm -rf "$1/usr/share/bash-completion"