# $Id: Portfile 107439 2013-06-29 10:52:06Z jmr@macports.org $
# -*- 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        einars js-beautify 1.4.0 v
name                py-jsbeautifier
categories-append   textproc
license             MIT
platforms           darwin
supported_archs     noarch
maintainers         nomaintainer
description         JS beautifier written in Python
long_description    ${description}
homepage            http://jsbeautifier.org/

checksums           rmd160 283f13781596246d898b8383aaf1725d3d8ce76a \
                    sha256 fb364b3df2057a50e3199411eaeb3d99ac4aebd309e8a043f3dfcf25487e0bac

python.versions     26 27

if {$subport != $name} {
    build.dir           ${worksrcpath}/python

    post-destroot {
        reinplace "s|#! /usr/bin/env python|#!${python.bin}|" ${build.dir}/js-beautify
        xinstall -m 755 ${build.dir}/js-beautify ${destroot}${python.prefix}/bin
    }
}
