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

name                netatalk4
conflicts           netatalk

github.setup        Netatalk netatalk 4-1-2 netatalk-
version             [string map {- .} ${github.version}]
github.tarball_from releases
distname            netatalk-${version}
use_xz              yes
revision            0

checksums           rmd160  69db6dd990911f3de81c7e49ca6908bfb2d62c9d \
                    sha256  a825f6ff7efedb09bb9ca75727ab43126797000f89775db72c8d9520bf481e9c \
                    size    922960

categories          net
license             GPL-2+
maintainers         {@trodemaster icloud.com:manuals-unread2u} openmaintainer

description         Netatalk is a freely-available Open Source AFP fileserver.
long_description    Netatalk is a freely-available Open Source AFP fileserver. \
                    It allows Unix-like operating systems to serve as file \
                    servers for Macintosh computers.

homepage            https://netatalk.io

depends_build-append       path:bin/pkg-config:pkgconfig

depends_lib         port:db48 \
                    port:libevent \
                    port:libgcrypt

configure.args-append -Dwith-init-style=none \
                      -Dwith-pam-config-path=${prefix}/etc/pam.d \
                      -Dwith-lockfile-path=${prefix}/var/run

startupitem.create  yes
startupitem.executable  ${prefix}/sbin/netatalk -d -F ${prefix}/etc/afp.conf
startupitem.logfile ${prefix}/var/log/${name}.log
startupitem.logfile.stderr ${prefix}/var/log/${name}-stderr.log
startupitem.logevents yes
startupitem.debug          yes

notes "
    Configuration files can be found in:
        ${prefix}/etc/
    
    Log files can be found in:
        ${prefix}/var/log/
"
