#!/bin/sh -e

# Credit to kqz for this.
# Remove gettext. Should allow for kiss compat.
sed -i '/        @+(cd po && $(MAKE))/d' Makefile.in
sed -i '/        @+if $(enable_nls); then (cd po && $(MAKE) $@); fi/d' Makefile.in
sed -i '/        @+if $(enable_nls); then (cd po && $(MAKE) $@); fi/d' Makefile.in
sed -i '/        @+if $(enable_nls); then (cd po && $(MAKE) $@); fi/d' Makefile.in
sed -i '/        @+(cd po && $(MAKE) update-po)  # must be done first/d' Makefile.in
sed -i '/        -@+(cd po       && $(MAKE) mostlyclean)/d' Makefile.in
sed -i '/        -@+(cd po       && $(MAKE) clean)/d' Makefile.in
sed -i '/        -@+(cd po       && $(MAKE) distclean)/d' Makefile.in
sed -i '/        -@+(cd po       && $(MAKE) maintainer-clean)/d' Makefile.in

./configure      \
   --prefix=/usr \
   --disable-nls \

make
make DESTDIR="$1" install

ln -s yash "$1/usr/bin/sh"
