# Maintainer: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>

pkgname=ttyrec
pkgver=1.0.8
pkgrel=2
pkgdesc="A tty recorder"
arch=('i686' 'x86_64')
url="http://0xcc.net/ttyrec/"
license=('BSD')
depends=('sh')
source=("http://0xcc.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        'ttyrec-1.0.8-cygwin-patch')
sha256sums=('ef5e9bf276b65bb831f9c2554cd8784bd5b4ee65353808f82b7e2aef851587ec'
            '3a3ad66a5205a84b839176b5b5d78e83ef9629bdd70737cd9ba488d02e2fb02d')

prepare() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   patch -p1 -i "${srcdir}/ttyrec-1.0.8-cygwin-patch"
}

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

package() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   install -D -m755 ttyrec.exe "${pkgdir}/usr/bin/ttyrec"
   install -D -m755 ttyplay.exe "${pkgdir}/usr/bin/ttyplay"
   install -D -m755 ttytime.exe "${pkgdir}/usr/bin/ttytime"
}
