# -*- 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.2.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  52d6209328a823f46c3e7920a889a4cdd0ab5244 \
                        sha256  38e65411292510429261999b4370cb7a7713f57ba24bde806bec8f66c17f5b90 \
                        size    550673

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
