app=git
version=2.28.1
build=1sml
homepage="https://git-scm.com/"
download="https://mirrors.edge.kernel.org/pub/software/scm/git/git-$version.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
"
