Hi folks,

On Fri, Sep 24, 2021 at 02:33:34PM -0500, Marius Schamschula wrote:
> Sergey,
> 
> I’ve edited those parts:

is there any other suggestions or comments on the www/unit/Portfile?

Thank you.

--
Sergey Osokin
# -*- 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            unit
version         1.25.0
categories      www
platforms       darwin
license         Apache-2
maintainers     osokin

description     Dynamic web application server

long_description \
    NGINX Unit is a dynamic web application server, designed \
    to run applications in multiple languages.  Unit is lightweight, \
    polyglot, and dynamically configured via API.  The design of the \
    server allows reconfiguration of specific application parameters \
    as needed by the engineering or operations.

homepage        https://unit.nginx.org/

master_sites    https://unit.nginx.org/download/

checksums       sha256  
4ab4f05a934dd00628c0e067f7d0c5ba62bb55e9e2e7a333fa3764a180b9765d \
                size    853280 \
                rmd160  d08da7f6404e3fad4a69f31ba203cc9a3b69024c

depends_lib     port:pcre2 \
                port:zlib

set unit_vardir         ${prefix}/var
set unit_dbdir          ${unit_vardir}/db/${name}
set unit_logdir         ${unit_vardir}/log/${name}
set unit_logfile        ${unit_logdir}/${name}.log
set unit_rundir         ${unit_vardir}/run/${name}
set unit_pidfile        ${unit_rundir}/${name}.pid
set unit_sockfile       ${unit_rundir}/control.unit.sock
set unit_tmpdir         ${unit_vardir}/tmp/${name}
set unit_moddir         ${prefix}/libexec/${name}/modules

configure.args  --prefix=${prefix} \
                --log=${unit_logfile} \
                --modules=libexec/${name}/modules \
                --pid=${unit_pidfile} \
                --state=${unit_dbdir} \
                --tmp=${unit_tmpdir} \
                --user=_www \
                --group=_www

default_variants        +debug +ssl

destroot.keepdirs       ${destroot}${unit_moddir}

subport ${name} {
    post-destroot {
        xinstall -d -m 755 ${destroot}${unit_dbdir}
        xinstall -d -m 755 ${destroot}${unit_logdir}
        xinstall -d -m 755 ${destroot}${unit_rundir}
        xinstall -d -m 755 ${destroot}${unit_tmpdir}
    }
}
    
subport ${name}-perl {
    description         Perl module for NGINX Unit

    long_description    {*}${description}

    depends_run         port:unit

    post-configure {
        system -W ${worksrcpath} "${configure.cmd} perl"
    }

    build {
        system -W ${worksrcpath} "${build.cmd} perl"
    }

    destroot {
        xinstall -d -m 755 ${destroot}${unit_moddir}
        xinstall    -m 644 ${worksrcpath}/build/perl.unit.so 
${destroot}${unit_moddir}/
    }
}

subport ${name}-python {
    description         Python module for NGINX Unit

    long_description    {*}${description}

    depends_run         port:unit

    post-configure {
        system -W ${worksrcpath} "${configure.cmd} python"
    }

    build {
        system -W ${worksrcpath} "${build.cmd} python"
    }

    destroot {
        xinstall -d -m 755 ${destroot}${unit_moddir}
        xinstall -m 644 ${worksrcpath}/build/python.unit.so 
${destroot}${unit_moddir}/
    }
}

subport ${name}-ruby {
    description         Ruby module for NGINX Unit

    long_description    {*}${description}

    depends_run         port:unit

    post-configure {
        system -W ${worksrcpath} "${configure.cmd} ruby"
    }

    build {
        system -W ${worksrcpath} "${build.cmd} ruby"
    }

    destroot {
        xinstall -d -m 755 ${destroot}${unit_moddir}
        xinstall -m 644 ${worksrcpath}/build/ruby.unit.so 
${destroot}${unit_moddir}/
    }
}

startupitem.create      yes
startupitem.pidfile     auto ${unit_pidfile}
startupitem.executable  ${prefix}/sbin/unitd

variant debug description "Enable debug logging" {
    configure.args-append   --debug
}

variant ssl description "Support secure connections using OpenSSL" {
    depends_lib-append      path:lib/libssl.dylib:openssl
    configure.args-append   --openssl
}

Attachment: signature.asc
Description: PGP signature

Reply via email to