# -*- 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            burp
version         2.1.32
revision        2

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.

platforms       darwin
homepage        http://burp.grke.org/
master_sites    sourceforge:project/burp/burp-${version}/
use_bzip2       yes

depends_build   port:pkgconfig

depends_lib     path:lib/libssl.dylib:openssl \
                port:librsync \
                port:zlib \
                port:ncurses \
                port:gettext \
                port:uthash

checksums           rmd160  3cd474af00b1742f93ed85e48f3de39becbb7142 \
                    sha256  56f8a13ae96e50f2274857a08c9f3d9f06ed6dee306d49fd189e3ff9f93c74fd

configure.cppflags-append "-I${prefix}/include/uthash"
configure.cflags-append -g
configure.args  --sbindir=${prefix}/sbin

destroot.target install-all

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

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

livecheck.url ${homepage}/download.html
livecheck.regex {<li>([0-9.]+): Stable$}

