# $Id: Portfile 106911 2013-06-11 14:40:14Z jmr@macports.org $

PortSystem 1.0
PortGroup python 1.0

name			py-eyed3
version			0.7.1
categories-append	audio
license			GPL-2+
platforms		darwin
supported_archs	noarch
maintainers		elelay openmaintainer
description		python module and program for processing ID3 tags
long_description	eyeD3 is a Python program/module for processing \
				(reading and writing) ID3 tags. Information about mp3 \
				files (i.e bit rate, sample frequency, play time, \
				etc.) is also available. The formats supported are ID3 \
				v1.0/v1.1 and v2.3/v2.4.

homepage		http://eyed3.nicfit.net/
master_sites	${homepage}releases/
distname		eyeD3-${version}
extract.suffix		.tgz
checksums           sha1    6f67346845af42c03448f25e8b524449f1170b51

# setyp.py is not compatible with python 2.5 as of 0.7.1
python.versions	26 27

if {$subport != $name} {
    # override commands because they add --no-user-cfg which is not supported
    build.cmd       "${python.bin} setup.py"
    destroot.cmd       "${python.bin} setup.py"
    
    depends_build-append port:py${python.version}-setuptools

    pre-destroot	{
        reinplace "s|python|${python.bin}|g" ${worksrcpath}/bin/eyeD3
    }
    post-destroot {
        xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog README.rst \
            ${destroot}${prefix}/share/doc/${subport}
    }
    livecheck.type  none
} else {
    livecheck.type      regex
    livecheck.url       ${homepage}
    livecheck.regex     "eyeD3 v(\\d+\\.\\d+\\.\\d+)"
}
