core/smdev/ndmake.sh
$ cat ndmake.sh
#!/bin/sh -ue
NAME=smdev
VERSION=git
RELEASE=1
SOURCE="git://git.suckless.org/smdev"
build() {
msg "patching for musl makedev compatibility..."
if ! grep -q 'sys/sysmacros.h' smdev.c; then
sed -i '/^#include <sys\/stat.h>/a #include <sys/sysmacros.h>' smdev.c || die "patch failed"
fi
msg "building smdev..."
make CC="${CC:-cc}" LDFLAGS="-static" -j"$NPROC" || die "make failed"
msg "installing smdev..."
make PREFIX="$PREFIX" DESTDIR="$PKG" install || die "make install failed"
}
. ${0%/*}/../../libsh/libdmake.sh
