# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                posix-manpages
version             2017
categories          devel
platforms           any
supported_archs     noarch
license             Permissive
maintainers         {makr @mohd-akram} openmaintainer

description         POSIX manpages

long_description    Manpages for POSIX (IEEE Std 1003.1) including headers, \
                    utilities and functions.

homepage            https://pubs.opengroup.org/onlinepubs/9699919799/

livecheck.name      man-pages-posix
master_sites        https://www.kernel.org/pub/linux/docs/man-pages/${livecheck.name}/
distname            ${livecheck.name}-${version}-a

checksums           rmd160  bd727b8e713c19a7eb7bb9028e4e82ed1104eb73 \
                    sha256  8ba538e91db62622c507e34899e1e7d560e870505c00cd4d7f8d5048e54d056e \
                    size    1506301

use_configure       no
build {}
destroot {
    xinstall -d ${destroot}${prefix}/share/man/man0
    system -W ${worksrcpath}/man0p "ls | xargs -I {} install {} \
        ${destroot}${prefix}/share/man/man0/posix:{}"
    xinstall -d ${destroot}${prefix}/share/man/man1
    system -W ${worksrcpath}/man1p "ls | xargs -I {} install {} \
        ${destroot}${prefix}/share/man/man1/posix:{}"
    xinstall -d ${destroot}${prefix}/share/man/man3
    system -W ${worksrcpath}/man3p "ls | xargs -I {} install {} \
        ${destroot}${prefix}/share/man/man3/posix:{}"
}

notes "Use the posix: prefix to access POSIX man pages. Example: man posix:grep"
