# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                borgmatic
version             2.0.7
revision            0

checksums           rmd160  2fd34155e3932c10bd72b4548f02907bf9b6850f \
                    sha256  1ee9ca5d5b83193747f82cc841bb64374a11328710ee0561e8c7fa2fbc258406 \
                    size    684455

categories          sysutils
platforms           {darwin any}
supported_archs     noarch
license             GPL-3
maintainers         {cal @neverpanic} openmaintainer

description         convenience wrapper around borgbackup
long_description    \
    borgmatic is simple, configuration-driven backup software for servers and \
    workstations. Protect your files with client-side encryption. Backup your \
    databases too. Monitor it all with integrated third-party services.

homepage            https://torsion.org/borgmatic/

python.default_version  313

depends_build-append \
                    port:py${python.version}-setuptools

depends_run-append  \
                    port:borgbackup \
                    port:py${python.version}-colorama \
                    port:py${python.version}-jsonschema \
                    port:py${python.version}-packaging \
                    port:py${python.version}-requests \
                    port:py${python.version}-ruamel-yaml \
                    port:py${python.version}-ruamel-yaml-clib

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}

    xinstall -m 0644 \
        ${worksrcpath}/AUTHORS \
        ${worksrcpath}/LICENSE \
        ${docdir}
}

notes "If you are upgrading from borgmatic < 2.0, there are few breaking changes:
- BREAKING: For both new and deprecated command hooks, run a configured 'after'\
hook even if an error occurs first. This allows you to perform cleanup steps\
that correspond to 'before' preparation commands—even when something goes\
wrong.
- BREAKING: Run all command hooks (both new and deprecated) respecting the\
'working_directory' option if configured, meaning that hook commands are run\
in that directory.

Additionally, the configuration format changed, especially around before_*,\
after_* and on_error hooks. See \[1] for the current docs. \[2] has\
instructions to upgrade your current configuration file to match the new format\
(use borgmatic config generate --source oldconfig.yaml).

\[1]: https://torsion.org/borgmatic/docs/how-to/add-preparation-and-cleanup-steps-to-backups/
\[2]: https://torsion.org/borgmatic/docs/how-to/upgrade/#upgrading-your-configuration"
