# -*- 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-2-4 netatalk-
version             [string map {- .} ${github.version}]
github.tarball_from releases
distname            netatalk-${version}
use_xz              yes
revision            0

checksums           rmd160  a682cfea457f5b78840c20b67e510b40f4d280bb \
                    sha256  4f07bbe118a951dd740d3f51a87b5cafba2496bd0b22e704438f421aa6670f99 \
                    size    935184

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 \
                           port:cmark

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

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

patchfiles          bison.diff

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 "
    
    Upgrade details: https://netatalk.io/manual/en/Upgrading

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