# -*- 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
# $Id: Portfile 65908 2010-04-02 22:28:17Z jmr@macports.org $

PortSystem              1.0
PortGroup               python26 1.0

name                    py26-tvdb
version                 1.4
platforms               darwin
maintainers             jameskyle
description             An easy to use API interface to TheTVDB.com

homepage                http://github.com/dbr/tvdb_api
master_sites            ${homepage}
distname                tvdb_api-${version}
fetch.type              git
git.url                 git://github.com/dbr/tvdb_api.git
git.branch              1.4


build.cmd               ${python.bin} setup_tvdb_api.py --no-user-cfg
destroot.cmd            ${python.bin} setup_tvdb_api.py --no-user-cfg
depends_lib-append      port:py26-distribute

post-build {
    system "cd ${worksrcpath} && \ 
            ${python.bin} setup_tvnamer.py --no-user-cfg build"
}

post-destroot {
  ln -s ${python.pkgd}/tvnamer.py ${destroot}${prefix}/bin/tvnamer.py
  system "chmod +x ${destroot}${python.pkgd}/tvnamer.py"
  
}
