# Maintainer: Erich Gubler <erichdongubler@gmail.com>

pkgname=moreutils
pkgver=0.69
pkgrel=1
pkgdesc="A growing collection of the unix tools that nobody thought to write thirty years ago"
arch=('i686' 'x86_64')
url="https://joeyh.name/code/moreutils/"
license=('GPL2')
makedepends=('docbook-xml' 'git' 'make' 'gcc' 'docbook-xsl')
source=("git+https://git.joeyh.name/git/moreutils.git#tag=${pkgver}")
sha256sums=('81dc7a6d7ba9733648a850313a80930f73624a6808a1fcfd4bc8e1151453171d')

build() {
  cd "${srcdir}"/${pkgname}
  make DOCBOOKXSL="$(ls -d /usr/share/xml/docbook/xsl-stylesheets-* | tail --lines=1)"
  rename .exe '' *.exe
}

package() {
  cd "${srcdir}"/${pkgname}
  make PREFIX="${pkgdir}"/usr install
  # Conflict with parallel package
  rm -f "${pkgdir}"/usr/share/man/man1/parallel.1
}
