void-packages/srcpkgs/mg/template
2020-03-08 05:41:19 +01:00

30 lines
884 B
Bash

# Template file for 'mg'
pkgname=mg
version=20200215
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=4802750c4cd52e8154b38e7e1549d68b704230e4b44f5884932b3b08efdaa9bb
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}
}