# Contributor: Rafael Kitover <rkitover@gmail.com>
# Anyone is welcome to update this package, for new versions or patches or w/e.

pkgname=('rlwrap')
pkgver=0.48
pkgrel=1
pkgdesc='utility that uses the GNU readline library to allow the editing of keyboard input for any command'
arch=('i686' 'x86_64')
groups=('utilities')
license=('spdx:GPL-2.0-or-later')
url='https://github.com/hanslub42/rlwrap'
msys2_repository_url='https://github.com/hanslub42/rlwrap'
msys2_references=(
  "anitya: 4199"
)
depends=('libreadline')
makedepends=('gcc' 'libreadline-devel' 'autotools')
install=rlwrap.install
source=("https://github.com/hanslub42/rlwrap/releases/download/v${pkgver}/rlwrap-${pkgver}.tar.gz")
sha256sums=('cdf69074a216a8284574dddd145dd046c904ad5330a616e0eed53c9043f2ecbc')

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr --without-libptytty
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
