# Maintainer: Ray Donnelly <mingw.android@gmail.com>

pkgname=remake
conflicts=("remake-git")
replaces=("remake-git")
_remakever="dbg-1.6"
pkgver=4.3+dbg1.6
pkgrel=1
pkgdesc="Enhanced GNU Make - tracing, error reporting, debugging, profiling and more"
arch=('i686' 'x86_64')
url="https://github.com/rocky/remake"
license=('GPL3')
depends=('guile'
         'libreadline')
#options=('debug' '!strip')
makedepends=('gettext'
             'gettext-devel'
             'git'
             'gcc'
             'wget'
             'autotools'
             'libreadline-devel')
source=("https://sourceforge.net/projects/bashdb/files/remake/4.3%2B${_remakever}/remake-4.3%2B${_remakever}.tar.gz")
sha256sums=('f6a0c6179cd92524ad5dd04787477c0cd45afb5822d977be93d083b810647b87')

prepare() {
  cd ${srcdir}/${pkgname}-4.3+${_remakever}
  autoreconf -fiv
}

build() {
  cd ${srcdir}/${pkgname}-4.3+${_remakever}

  ./configure \
    --prefix=/usr \
    --build=${CHOST} \
    --without-libintl-prefix \
    --without-libiconv-prefix \
    ac_cv_dos_paths=yes

  make
}

check() {
  cd ${srcdir}/${pkgname}-4.3+${_remakever}
  make check
}

package() {
  cd ${srcdir}/${pkgname}-4.3+${_remakever}
  make DESTDIR=${pkgdir} install
  rm "${pkgdir}"/usr/share/info/make.info{,-1,-2}
}
