# Contributor (Arch): drrossum <d.r.vanrossum at gmx.de>
# Contributor (Arch): sh0 <mee@sh0.org>
# Maintainer : Aurélien Desbrières <aurelien@xload.io>

pkgname=pdsh
pkgver=2.33
pkgrel=1
pkgdesc='Parallel Distributed Shell'
url='https://github.com/chaos/pdsh/'
arch=('i686' 'x86_64' 'armv7h')
license=('GPL')
depends=('glibc' 'openssh' 'readline')
optdepends=('perl: required by the dshbak utility')
options=('libtool')
source=("https://github.com/chaos/{$pkgname}/releases/download/{$pkgname}-{$pkgver}/{$pkgname}-${pkgver}.tar.gz")
sha256sums=('7368087429d6269f0a6313c406ef38c6a6a947bc003ca7368fc6481b139d942f')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr --mandir=/usr/share/man \
              --without-rsh \
              --with-ssh \
              --with-dshgroups \
              --with-readline || return 1
  make || return 1
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}/" install || return 1
}
