# Maintainer: PktSurf <smlinux@pktsurf.in>
app=make
version=4.4
build=2sml
homepage="https://www.gnu.org/software/make/"
download="https://ftp.gnu.org/gnu/make/make-$version.tar.gz"
desc="GNU make utility to maintain groups of programs"
requires="musl"
noautoconfsite=1

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

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

  applypatch $srcdir/0001-src-main.c-main-SV-63307-Handle-SIGPIPE-as-a-fatal-s.patch
}

build() {
  ./configure \
    --prefix= \
    --without-guile 

  make
  make install DESTDIR=$pkg

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
39c0ea12c423da056f00f537cfb350121cdcb72bd899899314e680ed640acc3f32cc2de4b9128e0a96aa47838fbe5277c00a14c54d67c06697df53d6303dc6ee  make-4.4.tar.lz
b5777e14e06d78bad4d6cb2729be3735af35db51fd97428f3950f64343d07b5a543444e672c7c8cce7458af836b947cc1d689c634b8939d1468ed61cf56e1e1f  0001-src-main.c-main-SV-63307-Handle-SIGPIPE-as-a-fatal-s.patch
"
