# GNU sh-utils, ftp://ftp.gnu.org/gnu/sh-utils/

name=sh-utils
version=2.0
source=($name-$version.tar.gz $name-$version.patch factor.1 seq.1)

build() {
    cd $name-$version 
    patch -p1 < ../$name-$version.patch
    ./configure --prefix=/usr
    make
    make DESTDIR=$PKG install
    cp ../{factor.1,seq.1} $PKG/usr/man/man1
    rm -rf $PKG/usr/info
    rm $PKG/usr/bin/hostname $PKG/usr/man/man1/hostname.1   # conflicts with net-tools
    rm $PKG/usr/bin/uptime                                  # conflicts with procps
    rm $PKG/usr/bin/su $PKG/usr/man/man1/su.1		    # conflicts with shadow
    mkdir $PKG/bin
    (cd $PKG/usr/bin; mv date echo false pwd stty true uname ../../bin)
    strip $PKG/bin/* $PKG/usr/bin/*
    gzip -9 $PKG/usr/man/man?/*
    chmod -R +w $PKG
}
