# Description: An implementation of the standard Unix documentation system accessed using the man command
# URL: https://man-db.nongnu.org/
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: zlib gdbm libpipeline

name=man-db
version=2.10.2
release=1
source=(https://download.savannah.gnu.org/releases/$name/$name-$version.tar.xz
	mandb.cron)

build() {
	cd $name-$version

	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib/$name \
		--disable-setuid \
		--disable-cache-owner \
		--disable-nls \
		--with-systemdtmpfilesdir=no \
		--with-systemdsystemunitdir=no

	make
	make DESTDIR=$PKG install

	rm -r $PKG/usr/share/doc

	install -d $PKG/var/cache/man
	install -D -o root -g root -m 0755 $SRC/mandb.cron $PKG/etc/cron/daily/mandb
}
