void-packages/srcpkgs/mg/template

31 lines
884 B
Bash

# Template file for 'mg'
pkgname=mg
version=20200723
revision=1
hostmakedepends="pkg-config"
makedepends="libbsd-devel ncurses-devel"
short_desc="Micro GNU/emacs"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Public Domain"
homepage="https://github.com/hboetes/mg"
distfiles="https://github.com/hboetes/mg/archive/${version}.tar.gz"
checksum=2ee7cf5e1ea9aee1df296840276a0f940a72f5dfa07c5d2be36cdb13236bd797
CFLAGS="-DTCSASOFT=0"
case "$XBPS_TARGET_MACHINE" in
*-musl) CFLAGS+=" -DREG_STARTEND=0";;
esac
do_configure() {
sed -i "s,\(BSD_CPPFLAGS:=\).*,\1 -isystem ${XBPS_CROSS_BASE}/usr/include/bsd -DLIBBSD_OVERLAY,g" GNUmakefile
sed -i "s,\(BSD_LIBS:=\).*,\1 -lbsd,g" GNUmakefile
}
do_build() {
make CC="$CC" CFLAGS="$CFLAGS" prefix=/usr ${makejobs}
}
do_install() {
vmkdir usr/bin
make install prefix=/usr bindir=/usr/bin mandir=/usr/share/man DESTDIR=${DESTDIR}
}