? Loading fortune...
devel/f2fs-tools/ndmake.sh
$ cat ndmake.sh
#!/bin/sh -ue
NAME=f2fs-tools
VERSION=1.16.0
RELEASE=1
SOURCE="https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/f2fs-tools-${VERSION}.tar.gz
no-lfs64.patch"
BUILD_OPT="-Dwith_selinux=no -DUNDEF_HAVE_LIBSELINUX=1 -Dlibselinux_LIBS= \
-Dwith_blkid=no -DUNDEF_HAVE_LIBBLKID=1 -Dlibblkid_LIBS= \
-Dwith_lzo2=no -DUNDEF_HAVE_LIBLZO2=1 -Dliblzo2_LIBS= \
-Dwith_lz4=no -DUNDEF_HAVE_LIBLZ4=1 -Dliblz4_LIBS= \
-DUNDEF_HAVE_LIBUUID=1 -Dlibuuid_LIBS= \
-DDEF_F2FS_TOOLS_VERSION=\"1.16.0\" \
-DDEF_F2FS_TOOLS_DATE=\"2023-04-11\" \
-DDEF_F2FS_MAJOR_VERSION=1 \
-DDEF_F2FS_MINOR_VERSION=16 \
-DDEF_HAVE_SETMNTENT=1"
build() {
msg "build system: hell"
if [ -f tools/f2fs_io_parse.c ]; then
sed -i \
-e 's@#include <sys/queue.h>@#if defined(__has_include)\n# if __has_include(<sys/queue.h>)\n# include <sys/queue.h>\n# elif __has_include(<bsd/sys/queue.h>)\n# include <bsd/sys/queue.h>\n# else\n# error "sys/queue.h not found"\n# endif\n#else\n# include <sys/queue.h>\n#endif@' \
tools/f2fs_io_parse.c
fi
if [ -f tools/Makefile.am ] && ! grep -q '^parse_f2fs_LDADD' tools/Makefile.am; then
echo 'parse_f2fs_LDADD = -lbsd' >> tools/Makefile.am
fi
if [ -f configure.ac ] || [ -f configure.in ]; then
has_cmd demiurge && demiurge . || msg "warning: demiurge not found"
fi
[ ! -f .satan ] && echo "LDFLAGS=${LDFLAGS}" > .satan
satan gen ${BUILD_OPT} PREFIX="$PREFIX" DESTDIR="$PKG" . || die "satan gen failed"
samu || die "samu build failed"
if [ ! -f mkfs/include/f2fs_fs.h ] && [ -f include/f2fs_fs.h ]; then
mkdir -p mkfs/include
cp include/f2fs_fs.h mkfs/include/f2fs_fs.h
fi
if [ ! -f fsck/include/quota.h ] && [ -f include/quota.h ]; then
mkdir -p fsck/include
cp include/quota.h fsck/include/quota.h
fi
DESTDIR="$PKG" samu install || die "samu install failed"
}
. ${0%/*}/../../libsh/libdmake.sh