# $Id: Portfile 84512 2011-09-27 14:19:06Z snc@macports.org $

PortSystem          1.0
PortGroup           ruby 1.0

ruby.setup          rdiscount 1.6.5 gem {} rubygems ruby19
description         Fast Implementation of Gruber's Markdown in C
long_description    \
    Discount is an implementation of John Gruber's Markdown markup language \
    in C. It implements all of the language described in the markdown syntax \
    document and passes the Markdown 1.0 test suite.
maintainers         singingwolfboy openmaintainer
homepage            http://github.com/rtomayko/rdiscount
platforms           darwin
license             BSD
checksums           md5     2de321f1ba826f80b84fe45c0d013fcf \
                    sha1    9cf0ad4d70e85fe6df8fcd86a19d1698d32da95b \
                    rmd160  b178d462c8115c6fbeccc1b7be647bf1aeb82bd6

post-destroot {
    set gemdir ${destroot}${prefix}/lib/ruby${ruby.prog_suffix}/gems/${ruby.version}/gems/${worksrcdir}
    set mandir ${destroot}${prefix}/share/man/
    set docdir ${destroot}${prefix}/share/doc/${ruby.module}
    xinstall -d ${docdir}

    xinstall ${gemdir}/man/rdiscount.1 ${mandir}/man1/
    xinstall ${gemdir}/man/markdown.7 ${mandir}/man7/
    xinstall -W ${gemdir} README.markdown ${docdir}
}
