# -*- 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
# $Id$

PortSystem                  1.0

name                        fsvs
version                     1.2.7
categories                  devel
platforms                   darwin
maintainers                 ryandesign openmaintainer
license                     GPL-3

description                 Fast System VerSioning

long_description            FSVS is a complete backup/restore/versioning tool \
                            for all files in a directory tree or whole \
                            filesystems, with a Subversion repository as the \
                            backend. Think of it like tar or rsync with \
                            versioned storage.

homepage                    http://fsvs.tigris.org/
master_sites                http://download.fsvs-software.org/ \
                            http://download.fsvs-software.org/old/
use_bzip2                   yes

checksums                   rmd160  b6a35de3205297678c4cfc2f5a38aaa3ca298902 \
                            sha256  e19d34111416c5a8e91d56cd98d3761fe64b24f6032eefbccae4a2e128d07779

depends_lib                 port:subversion \
                            port:apr \
                            port:gdbm \
                            port:pcre

patchfiles                  patch-configure.diff \
                            patch-src-Makefile.in.diff

configure.cflags-append     -fnested-functions

configure.universal_args

build.args                  CC=${configure.cc}

destroot.keepdirs           ${destroot}${prefix}/etc/fsvs \
                            ${destroot}${prefix}/var/spool/fsvs \
                            ${destroot}${prefix}/etc/fsvs/svn/auth/svn.simple \
                            ${destroot}${prefix}/etc/fsvs/svn/auth/ssl.server \
                            ${destroot}${prefix}/etc/fsvs/svn/auth/ssl.client-passphrase

post-destroot {
    xinstall -m 644 {*}[glob ${worksrcpath}/doc/*.1] ${destroot}${prefix}/share/man/man1
    xinstall -m 644 {*}[glob ${worksrcpath}/doc/*.5] ${destroot}${prefix}/share/man/man5
    
    set docdir ${destroot}${prefix}/share/doc/${subport}
    xinstall -d ${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        CHANGES \
        LICENSE \
        README \
        doc/FAQ \
        doc/PERFORMANCE \
        doc/USAGE \
        doc/fsvs-ssl-setup \
        doc/notice.txt \
        ${docdir}
}