pkgname=mandoc pkgver=1.14.6 pkgrel=1 pkgdesc="A suite of tools compiling mdoc from the OpenBSD project" arch=('x86_64') url="https://mdocml.bsd.lv" license=('ISC') depends=('zlib') makedepends=('less') source=(https://mandoc.bsd.lv/snapshots/${pkgname}-${pkgver}.tar.gz configure.local) sha256sums=(8bf0d570f01e70a6e124884088870cbed7537f36328d512909eb10cd53179d9c 950bb8333e740ec21f34569758e0cfe06f6f8cd91b643251830aaa249937ea89) prepare() { cd ${pkgname}-${pkgver} cp ${srcdir}/configure.local . } build() { cd ${pkgname}-${pkgver} # apply CFLAGS and LDFLAGS from makepkg.conf { echo "CC=${CHOST}-gcc" echo "AR=${CHOST}-gcc-ar" echo "CFLAGS=${CFLAGS@Q}" echo "LDFLAGS=${LDFLAGS@Q}" } >> configure.local local configure_args=( ${configure_options} ) ./configure ${configure_args[@]} make mandoc } package() { cd ${pkgname}-${pkgver} install -vDm755 mandoc ${pkgdir}/usr/bin/mandoc install -vDm644 mandoc.1 ${pkgdir}/usr/share/man/man1/mandoc.1 }