name=man-db
version=2.12.1
revision=1
tarball_url="https://download.savannah.nongnu.org/releases/man-db/man-db-${version}.tar.xz"
tarball_blake2b="b06c48431608cf798659d19df754d992dca8ba31842613a3326e376e80fe74d913146f45a7f3c5e70c421a2401aeabdb091de78ebb3102b9d70c194286c245a7"
source_hostdeps="automake autoconf libtool pkg-config"
imagedeps="groff"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs bash gdbm groff less libpipeline zlib"

regenerate() {
    autotools_recursive_regen
}

build() {
    autotools_configure \
        --disable-setuid \
        --with-systemdtmpfilesdir= \
        --with-systemdsystemunitdir= \
        --with-pager=/usr/bin/less

    make -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" make install

    post_package_strip
}
