APP=git
VERSION=2.28.1
BUILD=1sml
HOMEPAGE='https://git-scm.com/'
DOWNLOAD='https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.28.1.tar.xz'
DESC="Fast, scalable, distributed revision control system"
REQUIRES="curl openssl pcre asciidoc"

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

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

  make CC="$CC" $MAKEFLAGS \
    prefix="/" gitexecdir="/lib/git-core" \
    NO_TCLTK=1 NO_PYTHON=1 NO_EXPAT=1 NO_GETTEXT=1 \
    NO_REGEX=NeedsStartEnd \
    DESTDIR="$PKG" V=1 all install install-man

  rm -f $PKG/lib/perl5/core_perl_perllocal.pod
  install -Dm 755 gitk-git/gitk $PKG/bin/gitk
  install -Dm 664 perl/FromCPAN/Error.pm $PKG/lib/perl5/site_perl/Error.pm

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
c7f768c987185b7af9f971577d2ce335962c8c60b50c167d8a19f937e40279eaa669a0265d5f7369041ab491dbafc62231041e362df6ce5866d7d4cd6ba66021  git-2.28.1.tar.lz
"
