pkgname=scdoc
pkgver=1.9.7
license=('MIT')
pkgdesc='Tool for generating roff manual pages'
arch=('x86_64')
homepage='https://git.sr.ht/~sircmpwn/scdoc/'
depends=()
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://git.sr.ht/~sircmpwn/scdoc/archive/${pkgver}.tar.gz")
md5sums=("98d68f5d4f1884fab830e23728118678")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
  sed -e 's/-Werror//' \
    -i Makefile || leaf_error 'Failed to patch Makefile'
}

src_build() {
  make PREFIX=/usr LDFLAGS="$LDFLAGS"
}

src_check() {
  make -k check
}

src_install() {
  make PREFIX=/usr DESTDIR="$pkgdir" install
  install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
}

# vim:ft=sh syn=sh et sw=2:
