APP=grep
VERSION=3.6
BUILD=1sml
HOMEPAGE='https://www.gnu.org/software/grep/'
DOWNLOAD='https://ftp.gnu.org/gnu/grep/grep-2.14.tar.xz'
DESC="print lines matching a pattern"
REQUIRES="pcre"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  CFLAGS="-static" \
  ./configure \
    --prefix="" \
    --bindir=/bin \
    --sysconfdir=/etc 

  make CFLAGS="-static"
  make install DESTDIR=$PKG

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
8934544a19ded61344d83ff2cab501e86f17f8ae338892e0c36c2d2d8e63c76817840a0071ef5e3fcbca9115eba8a1aae0e4c46b024e75cd9a2e3bd05f933d90  grep-3.6.tar.xz
"
