# $Id: Portfile 35184 2008-03-19 23:56:58Z sfiera@macports.org $

PortSystem 1.0
PortGroup python25 1.0

name            py25-mpdclient2
version         0.48
description     Python MPD client library
categories      audio
maintainers     sfiera
long_description \
    Python library interfacing with MPD. Taken from Pygmy.

distname        pygmy-${version}
homepage        http://pygmy.berlios.de/
platforms       darwin
master_sites    ${homepage}files
use_bzip2       yes
checksums       md5 5cac04dbffff24a4b8f9ae0a77689a14 \
                sha1 a7c39edd8018a3238611813de0f43ba4c6ad61d3 \
                rmd160 064690b1d3ed52349d352d598e6fbdf89a4ced69

build {
    # force bytecode compilation of mpdclient2.py => mpdclient2.pyc
    system "cd ${worksrcpath} && python -c 'import mpdclient2'"
}
destroot {
    xinstall -m 755 -d ${destroot}${prefix}/lib/python2.5
    xinstall -m 755 -d ${destroot}${prefix}/lib/python2.5/site-packages
    xinstall -m 644 ${worksrcpath}/mpdclient2.py \
        ${destroot}${prefix}/lib/python2.5/site-packages
    xinstall -m 644 ${worksrcpath}/mpdclient2.pyc \
        ${destroot}${prefix}/lib/python2.5/site-packages
}
