# -*- 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             2013
categories          devel
platforms           darwin
supported_archs     noarch
license             Permissive
maintainers         {outlook.com:mohd.akram @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/

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

checksums           rmd160  b19d97fad34a199ebb34bb3b4085e1439f63de77 \
                    sha256  77de3cc94de6312d2b18d4bfd53b8922456688212dbfdee3ede6191f400a4b29 \
                    size    1489221

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"