# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Ray Donnelly <mingw.android@gmail.com>

pkgname=make
pkgver=4.2.1
pkgrel=1
pkgdesc="GNU make utility to maintain groups of programs"
arch=('i686' 'x86_64')
url="https://www.gnu.org/software/make"
license=('GPL3')
groups=('base-devel')
depends=('msys2-runtime' 'libintl' 'sh')
makedepends=('gettext' 'msys2-runtime-devel' 'procps')
install=${pkgname}.install
options=() # 'debug' '!strip')
source=("https://ftp.gnu.org/gnu/make/${pkgname}-${pkgver}.tar.bz2"{,.sig})
sha256sums=('d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589'
            'SKIP')
validpgpkeys=('3D2554F0A15338AB9AF1BB9D96B047156338B6D4')  # Paul Smith (Mad Scientist) <psmith@gnu.org>


prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  #autoreconf -fi
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure \
    --build=${CHOST} \
    --prefix=/usr \
    --without-libintl-prefix \
    --without-libiconv-prefix \
    --without-guile \
    ac_cv_dos_paths=yes

  make -j1 all
}

check() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make check
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
}
