# Maintainer: Sarah Ottinger <schalaalexiazeal@gmail.com>

_realname=cmdpack
pkgbase=mingw-w64-${_realname}
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
pkgver=1.06
pkgrel=2
pkgdesc='These are a set of utilities originally released by Neill Corlett (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/chungy/cmdpack"
license=('GPL3')
depends=("${MINGW_PACKAGE_PREFIX}-cc-libs")
makedepends=("${MINGW_PACKAGE_PREFIX}-asciidoc" "${MINGW_PACKAGE_PREFIX}-cc")
source=("https://github.com/chungy/cmdpack/archive/$pkgver.tar.gz")
sha256sums=('6ce7029c0f2b0fbc6a1e26fb3ad8003ed18836aa3ef35f148ec51cde0b703307')

prepare() {
  cd "$srcdir"
  rm -rf build-${MSYSTEM} | true
  cp -r "${_realname}-$pkgver" "build-${MSYSTEM}"
}

build() {
  cd "${srcdir}/build-${MSYSTEM}"
  make
}

package() {
  cd "${srcdir}/build-${MSYSTEM}"
  make DESTDIR="$pkgdir" prefix=${MINGW_PREFIX} install
  install -D -m644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
}
