pkgname=less
pkgver=679
pkgdesc='A terminal based program for viewing text files'
license=('GPL-3.0-or-later' 'BSD-2-Clause')
homepage='https://www.greenwoodsoftware.com/less/'
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://www.greenwoodsoftware.com/${pkgname}/${sources[0]}")
md5sums=("0386dc14f6a081a94dfb4c2413864eed")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

src_check() {
  make check
}

src_install() {
  make DESTDIR="${pkgdir}" install
  install -Dm644 {,"$pkgdir"/usr/share/licenses/$pkgname/}LICENSE
}

