# Maintainer: kez cleal <clealk@cardiff.ac.uk>

_realname=gw
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.2.5
pkgrel=1
pkgdesc="A genome browser for bam/cram and vcf files (mingw-w64)"
arch=(any)
mingw_arch=('ucrt64' 'clang64')
url="https://github.com/kcleal/gw"
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-htslib"
         "${MINGW_PACKAGE_PREFIX}-glfw"
         "${MINGW_PACKAGE_PREFIX}-libwebp"
         "${MINGW_PACKAGE_PREFIX}-freeglut"
         "${MINGW_PACKAGE_PREFIX}-glew"
         "${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-fontconfig"
         "${MINGW_PACKAGE_PREFIX}-dlfcn"
         "${MINGW_PACKAGE_PREFIX}-libpng"
         "${MINGW_PACKAGE_PREFIX}-zlib"
         "${MINGW_PACKAGE_PREFIX}-icu"
         "${MINGW_PACKAGE_PREFIX}-angleproject"
         )
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
             "${MINGW_PACKAGE_PREFIX}-skia"
             "${MINGW_PACKAGE_PREFIX}-pkgconf")
source=(https://github.com/kcleal/${_realname}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz)
sha256sums=('4eba705f0d24def016671f4cd60f35e8de9fce9be38835bcfff58dd73d4eb076')

build() {
    cd ${_realname}-${pkgver}
    make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  install -D -m755 gw.exe "${pkgdir}${MINGW_PREFIX}/bin/gw.exe"
  install -D -m644 .gw.ini "${pkgdir}${MINGW_PREFIX}/bin/.gw.ini"
}
