pkgname=make
pkgver=4.4.1
pkgdesc="GNU make utility to maintain groups of programs"
arch=('x86_64')
homepage="https://www.gnu.org/software/make"
license=('GPL3')
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://ftp.gnu.org/gnu/${pkgname}/${sources[0]}")
md5sums=("c8469a3713cbbe04d955d4ae4be23eeb")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  ./configure --prefix=/usr
  make
}

src_check() {
  chown -R leaf .
  su leaf -c "PATH=$PATH make check"
}

src_install() {
  make DESTDIR="${pkgdir}" install
}
