#!/bin/bash

cd $SOURCE_DIR
if [ ! -f gzip-$GZIP_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/pub/gnu/gzip/gzip-$GZIP_VER.tar.gz
fi

cd $BUILD_DIR
rm -rf gzip-$GZIP_VER
tar -xf $SOURCE_DIR/gzip-$GZIP_VER.tar.gz

rm -rf gzip-build
mkdir -p gzip-build
cd gzip-build

../gzip-$GZIP_VER/configure \
    --host=$TARGET \
    --prefix=
make DESTDIR=$HURD_DIR install

cd $ROOT