# Maintainer: Eli Schwartz <eschwartz@archlinux.org>

pkgname=checkbashisms
pkgver=2.20.5
pkgrel=1
pkgdesc='Debian script that checks for bashisms'
arch=('any')
url="https://packages.qa.debian.org/d/devscripts.html"
license=('GPL')
depends=('perl')
source=("http://http.debian.net/debian/pool/main/d/devscripts/devscripts_${pkgver}.tar.xz")
sha256sums=('84fb3c433707253d1570a9620d9e9a03622cf6e2fa601bb948fb1565e4514ce6')
b2sums=('3d4079d3268b3b9bfacdd0a4afcfee5390bdbf4660038306611d9c24e7b5c6453eff5f24d938c9764a17336475cd60615919adaa11dcf47495d930cd4b3b4e09')

package() {
    cd "${srcdir}"/devscripts-${pkgver}/scripts

    sed "s/###VERSION###/${pkgver}/g" checkbashisms.pl | install -Dm755 /dev/stdin "${pkgdir}"/usr/bin/checkbashisms
    install -Dm644 checkbashisms.1 "${pkgdir}"/usr/share/man/man1/checkbashisms.1
    install -Dm644 checkbashisms.bash_completion "${pkgdir}"/usr/share/bash-completion/completions/checkbashisms
}
