# -*- 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               openssl 1.0

github.setup            grke burp 3.3.0
github.tarball_from     archive
revision                0
categories              sysutils
license                 {AGPL-3+ OpenSSLException}
maintainers             {dports @drkp} openmaintainer
description             Backup and restore program
long_description \
    Burp is a network backup and restore program. It attempts to reduce \
    network traffic and the amount of space that is used by each backup.

homepage                https://burp.grke.org/

depends_build-append    path:bin/pkg-config:pkgconfig \
                        port:uthash

depends_lib-append      port:librsync \
                        port:zlib \
                        port:ncurses

checksums               rmd160  26cef0c33cf99cec2978bc060bbc2b7098424fd4 \
                        sha256  91fb6840dc98e7cb5d9ce98b82c26de9944a6f04458205559b768945cfa5bdfe \
                        size    551183

use_autoreconf          yes

# See: https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr

configure.cppflags-append \
                        -I${prefix}/include/uthash
configure.cflags-append -g

destroot.target         install-all

post-destroot {
    xinstall -d ${destroot}${prefix}/etc/${name}/CA-client
    file rename ${destroot}${prefix}/etc/CA.cnf ${destroot}${prefix}/etc/${name}/CA.cnf
    file rename ${destroot}${prefix}/etc/${name}-server.conf ${destroot}${prefix}/etc/${name}-server.conf.sample
    file rename ${destroot}${prefix}/etc/${name}.conf ${destroot}${prefix}/etc/${name}.conf.sample
}

destroot.keepdirs       ${destroot}${prefix}/etc/${name}/CA-client
