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

github.setup        rodnaph ghsum 0.0.1 v
categories          devel shells
platforms           darwin
maintainers         pu-gh.com:rod
license             MIT
description         Helper to checksum Github tags
long_description    \
    ghsum allows you to easily print Macports checksums for tagged \
    versions of your project on Github (or branches as well). This \
    can be useful for updating Portfiles

depends_lib         port:wget \
                    port:openssl \
                    port:p5.12-getopt-long-descriptive

checksums           rmd160 87e595444812a4e9c2cf90ea66f8436341dd25aa \
                    sha256 b2fc2d0308bc200fd34b0c6bee65ff2e4a3d02ee3b1b561b77f274ae52fc010d

use_configure       no
supported_archs     noarch

post-patch {
    reinplace       "s&#!/usr/bin/env perl&#!${prefix}/bin/perl5.12&" ${worksrcpath}/pearl
}

build               {}

destroot            {
    xinstall -m 0755 ${worksrcpath}/ghsum \
        ${destroot}${prefix}/bin/ghsum
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 ${worksrcpath}/LICENSE \
        ${destroot}${prefix}/share/doc/${name}
}

