# Maintainer: Orgad Shaneh <orgads@gmail.com>

_realname=cygnative
pkgname="${_realname}"
pkgver=r9.2cbf760
pkgrel=2
pkgdesc="A wrapper for cygwin programs which call native Win32 programs with stdin and/or stdout handle redirected"
arch=('i686' 'x86_64')
license=('MIT')
makedepends=('gcc')
url="https://github.com/davidecolombo/cygnative"
_commit="2cbf7602ebe94d0c948474b59d47bb746f041587"
source=("${_realname}"::"git+https://github.com/davidecolombo/cygnative#commit=${_commit}")
sha256sums=('SKIP')

pkgver() {
  cd ${pkgname}
  printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
}

package() {
  cd "${srcdir}/${_realname}"
  mkdir -p "${pkgdir}/usr/bin"
  gcc -O2 -o "${pkgdir}/usr/bin/cygnative" cygnative.c
}
