abinfo "Bootstrapping xmake ..."
"$SRCDIR"/configure

abinfo "Building xmake ..."
make

abinfo "Installing xmake ..."
make install DESTDIR="$PKGDIR" PREFIX="/usr"
install -Dvm0644 "$SRCDIR"/scripts/man/xmake.1 \
    "$PKGDIR/usr/share/man/man1/xmake.1"
install -Dvm0644 "$SRCDIR"/scripts/man/xrepo.1 \
    "$PKGDIR/usr/share/man/man1/xrepo.1"
install -Dvm644 "$SRCDIR"/xmake/scripts/completions/register-completions.bash \
    "$PKGDIR/usr/share/bash-completion/completions/$PKGNAME"
install -Dvm644 "$SRCDIR"/xmake/scripts/completions/register-completions.fish \
    "$PKGDIR/usr/share/fish/vendor_completions.d/$PKGNAME.fish"
install -Dvm644 "$SRCDIR"/xmake/scripts/completions/register-completions.zsh \
    "$PKGDIR/usr/share/zsh/site-functions/_$PKGNAME"
