master chld/ports-heresy / utils / dfm / ndmake.sh
 1#!/bin/sh -ue
 2NAME=dfm
 3VERSION=git
 4RELEASE=1
 5SOURCE="https://github.com/dylanaraps/${NAME}"
 6build(){
 7    CFLAGS="$CFLAGS -static" PREFIX="$PREFIX" LDFLAGS="$CFLAGS -static" ./configure || die "configure failed"
 8    sed -i 's#mkdir -p "/usr#mkdir -p "${DESTDIR}/usr#' Makefile
 9    sed -i 's#/usr/local/#${PREFIX}#g' Makefile
10
11    # though using some type of configure, this only builds with bmake.
12    # love u dylan araps
13    make PREFIX="$PREFIX" DESTDIR="$PKG" || "gmake failed"
14    make PREFIX="$PREFIX" DESTDIR="$PKG" install || "gmake install failed"
15} 
16
17. ${0%/*}/../../libsh/libdmake.sh