# Maintainer: Renato Silva <br.renatosilva@gmail.com>

_realname='easyoptions'
pkgname="${_realname}-git"
pkgver=r37.c481763
pkgrel=1
pkgdesc='Easy option parsing for Ruby and Bash'
url='https://github.com/renatosilva/easyoptions'
license=(BSD)
arch=('any')
depends=('ruby' 'bash')
makedepends=(git)
provides=(${_realname})
conflicts=(${_realname})
source=('git+https://github.com/renatosilva/easyoptions')
sha256sums=('SKIP')

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

package() {
    cd "${srcdir}/${_realname}"
    install -Dm755 easyoptions          "${pkgdir}/usr/bin/easyoptions"
    install -Dm755 bash/easyoptions.sh  "${pkgdir}/usr/bin/easyoptions.sh"
    install -Dm755 ruby/easyoptions.rb  "${pkgdir}/usr/lib/ruby/vendor_ruby/easyoptions.rb"
    install -Dm644 LICENSE              "${pkgdir}/usr/share/licenses/${_realname}/LICENSE"
}
