# Compiling Time: 0 SBU
# Maintainer: DeX77 <dex77@frugalware.org>

pkgname=mandoc
pkgver=1.14.6
pkgrel=2
pkgdesc='A suite of tools compiling mdoc from the OpenBSD project'
archs=('x86_64')
groups=('apps-extra')
url='https://mdocml.bsd.lv'
depends=('zlib')
provides=('man')
conflicts=('man')
up2date="Flasttar ${url}/snapshots/"
source=("${url}/snapshots/${pkgname}-${pkgver}.tar.gz"
        'configure.local'
        'mandoc.service'
        'mandoc.timer')
sha1sums=('4033a504b005e43a0642e195c1ef49609c65f1c4' \
          'ac4e0b432b1028ae649b4a8e2e023819374ef6fa' \
          'eecf63eeb796972450122cb8c218c0ffe00ff1af' \
          'b50b458da53ea98a688ba35cbc090351166a2f38')

build() {
	Fcd
	Fexec cp ../configure.local . || Fdie

    	# apply CFLAGS and LDFLAGS from makepkg.conf
	{
        	echo "CFLAGS=${CFLAGS@Q}"
	        echo "LDFLAGS=${LDFLAGS@Q}"
	} >> configure.local

	Fbuild
	Finstall 644 usr/lib/systemd/system/mandoc.timer
	Finstall 644 usr/lib/systemd/system/mandoc.service
	Fln ../mandoc.timer usr/lib/systemd/system/timers.target.wants/mandoc.timer
}


# optimization OK
