lib/libmd/ndmake.sh
$ cat ndmake.sh
#!/bin/sh -ue
NAME=libmd
VERSION=git
RELEASE=1
SOURCE="https://github.com/guillemj/libmd"
BUILD_STYLE="hell"

postbuild() {
	msg "installing libmd pkg-config file..."
	install -d "$PKG/$PREFIX/lib/pkgconfig" || die "failed to create pkg-config dir"
	cat > "$PKG/$PREFIX/lib/pkgconfig/libmd.pc" <<EOF || die "failed to write libmd.pc"
prefix=$PREFIX
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include

Name: libmd
Description: Message Digest functions from BSD systems
Version: $VERSION
URL: https://www.hadrons.org/software/libmd/
Maintainer: <libbsd@lists.freedesktop.org>
License: BSD-3-Clause and BSD-2-Clause and ISC and Beerware
Libs: -L\${libdir} -lmd
Cflags: -I\${includedir}
EOF
}

. ${0%/*}/../../libsh/libdmake.sh