# Maintainer: Martell Malone <martellmalone@gmail.com>

_realname=premake
pkgbase=mingw-w64-${_realname}4
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}4")
pkgver=4.3
pkgrel=1
pkgdesc="A build configuration tool. Describe your build using Lua and generate \
the project files for your specific toolset (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://premake.github.io"
license=('spdx:BSD-3-Clause')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc")
source=("https://downloads.sourceforge.net/sourceforge/premake/premake-${pkgver}-src.zip")
sha256sums=('36536490f8928d8ecde135da80cd8b751ea5bebe50cabba5c0de49cd41cb2780')

build() {
  cd "${srcdir}/${_realname}-${pkgver}/build/gmake.windows"
  CC=${MINGW_PREFIX}/bin/cc make
}

package() {
  cd "${srcdir}"/${_realname}-${pkgver}
  install -Dm755 bin/release/premake4 "${pkgdir}"${MINGW_PREFIX}/bin/premake4
}
