# $Id: Portfile 84374 2011-09-24 04:02:09Z 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

name                py-jsbeautifier
version             1.0
python.versions     24 25 26 27
categories-append   textproc
license             MIT
platforms           darwin
supported_archs     noarch
maintainers         singingwolfboy openmaintainer
description         JS beautifier written in Python
long_description    ${description}
homepage            http://jsbeautifier.org/
if {$subport != $name} {
    fetch.type          git
    git.url             https://github.com/einars/js-beautify.git
    distname            js-beautify
    build.dir           ${worksrcpath}/python
    
    depends_lib         port:py${python.version}-distribute
    
    post-destroot {
        reinplace "s|#! /usr/bin/env python|#!${python.bin}|" ${build.dir}/js-beautify
        xinstall -m 755 ${build.dir}/js-beautify ${destroot}${prefix}/bin/
    }
}
