# -*- 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           python 1.0
PortGroup           github 1.0

github.setup        threerings splatd 1.2 splatd-
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1
categories          net
license             BSD
platforms           {darwin any}
maintainers         nomaintainer
description         Splat: Scalable Periodic LDAP Attribute Transmogrifier
long_description    Splat is a daemon designed to help keep information \
                    in an LDAP directory in sync with information \
                    outside of an LDAP directory. This information can \
                    be any set of attributes on any object in the LDAP \
                    directory.

checksums           rmd160  25362ea657face6f72b1f103f0a92808132bc385 \
                    sha256  09829e95879234dfe28855bb0b29ad1b22d7868fe989f00d94d3856b69657078 \
                    size    94347

supported_archs     noarch

python.default_version  27

depends_lib        port:py${python.version}-ldap \
                   port:py${python.version}-twisted \
                   port:py${python.version}-zconfig

startupitem.create yes
startupitem.name   Splat
startupitem.start  "${prefix}/sbin/splatd -f ${prefix}/etc/splat.conf -p /var/run/splatd.pid"
startupitem.stop   "kill `cat /var/run/splatd.pid`"

post-destroot {
    xinstall -m 644 ${worksrcpath}/splat.conf ${destroot}${prefix}/etc/splat.conf.sample
    file rename ${destroot}${prefix}/bin/splatd ${destroot}${prefix}/sbin/splatd

    xinstall -W ${worksrcpath}/docs/man -m 644 splat.conf.5 ${destroot}${prefix}/share/man/man5
    xinstall -W ${worksrcpath}/docs/man -m 644 splatd.8     ${destroot}${prefix}/share/man/man8
}
