# -*- 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
PortGroup           cmake 1.1
PortGroup           github 1.0

name                pam-reattach
github.setup        fabianishere pam_reattach 1.3 v
github.tarball_from archive
revision            0

categories          security
license             MIT
maintainers         {@kakuhen} openmaintainer
platforms           darwin
description         PAM module to reattach to user's per-session bootstrap namespace
long_description    \
    A PAM module for reattaching to the authenticating user's per-session bootstrap \
    namespace on macOS. This allows users to make use of the pam_tid module within \
    programs like screen and tmux.

checksums           sha256  b1b735fa7832350a23457f7d36feb6ec939e5e1de987b456b6c28f5738216570 \
                    rmd160  51deb14c35521d3da87b60d9b1b3860597dad3f2 \
                    size    7556

variant withcli description { Install CLI application that reattaches } {
    configure.args-append   -DENABLE_CLI=ON
}

pre-fetch {
    if {${os.platform} eq "darwin" && ${os.major} < 11} {
        ui_error "${name} makes use of XPC, which requires OS X v10.7 or later."
        return -code error "incompatible Mac OS X version"
    }
}

notes "
When this module is not installed in /usr/local/lib/pam, you must specify the full path to the module in the PAM service file.
"