# Maintainer: PktSurf <smlinux@pktsurf.in>
app=git
version=2.30.8
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"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version
  fixbuilddirpermissions
}

build() {
  make CC="$CC" $MAKEFLAGS CFLAGS="$CFLAGS" \
    prefix="" gitexecdir="/lib/git-core" \
    NO_TCLTK=1 NO_PYTHON=1 NO_EXPAT=1 NO_GETTEXT=1 \
    NO_REGEX=NeedsStartEnd \
    DESTDIR="$pkg" 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="
a01b3c2a2aab6ad3e7604d3c15de3969249dae114dd5cc0505a534b1142b4342fc8160449d41dd6561b8fd4441a3b1de516d6b6d0cbf07fe0fd97dfcab8de2f9  git-2.30.8.tar.lz
"
