# -*- 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: Portfile 92837 2012-05-09 00:51:48Z ryandesign@macports.org $

PortSystem                  1.0

name                        fsvs
version                     1.2.4
revision                    1
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  8490cff4e8701c9cf71f5457cdb689911ca74ea9 \
                            sha256  f66a8d45c69a0851074adbb499e90ef44be0c9e641638ba48a25ae0b412cfc11

depends_lib                 port:subversion \
                            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 {
    eval xinstall -m 644 [glob ${worksrcpath}/doc/*.1] ${destroot}${prefix}/share/man/man1
    eval xinstall -m 644 [glob ${worksrcpath}/doc/*.5] ${destroot}${prefix}/share/man/man5
    
    set docdir ${destroot}${prefix}/share/doc/${name}
    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}
}
