PortSystem    1.0
PortGroup     python 1.0

name          bzr-gtk
version       0.100.0
revision      3
set branch    [join [lrange [split ${version} .] 0 1] .]
categories    devel python
platforms     {darwin any}
supported_archs noarch
license       GPL-2+
maintainers   {raimue @raimue}

description   Various GTK+ frontends for bzr
long_description  A bzr plugin that contains various GTK+ frontends to \
    different bzr commands.

homepage      http://bazaar-vcs.org/bzr-gtk
master_sites  https://launchpad.net/bzr-gtk/gtk2/${version}/+download/

checksums     md5     a7c2f27072bcacdcf8983ca6a2426dbd \
              sha1    6f1a55a4011b6e8084783fdc3b07233c3f4fb77a \
              rmd160  783d099d9be700193c1523a8c6d54826ada49187

python.default_version  27

depends_lib-append  port:bzr \
                    port:py${python.version}-pygtk

post-destroot {
    fs-traverse f "${destroot}${python.prefix}/share" {
        set pfile [string range $f [string length ${destroot}${python.prefix}] end]
        if {[file isdirectory $f]} {
            xinstall -d -m 0755 ${destroot}${prefix}${pfile}
        } else {
            ln -s ${python.prefix}${pfile} ${destroot}${prefix}${pfile}
        }
    }
}

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex {bzr-gtk-(\d+(?:\.\d+)*).tar.gz}
