# Maintainer: Oscar Fuentes <ofv@wanadoo.es>

_realname=ducible
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.2.1
pkgrel=1
pkgdesc="A tool to make Windows builds reproducible."
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git")
url="https://github.com/jasonwhite/ducible"
license=("MIT")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "git" "${MINGW_PACKAGE_PREFIX}-python3")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
source=("${_realname}"::"git+https://github.com/jasonwhite/ducible.git#tag=v${pkgver}")
sha256sums=('SKIP')

build() {
  cd "$srcdir/${_realname}"
  make
}

package() {
  cd "${srcdir}/${_realname}"
  mkdir -p "$pkgdir"${MINGW_PREFIX}/bin
  cp ducible.exe "$pkgdir"${MINGW_PREFIX}/bin
}
