# -*- 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           deprecated 1.0

name                subdownloader
version             2.0.18
set branch          [join [lrange [split ${version} .] 0 2] .]

platforms           any
supported_archs     noarch
categories          multimedia
license             GPL-3+
maintainers         nomaintainer

description         Automatically download and upload subtitles for videos
long_description    SubDownloader is a program for automatic download/upload \
                    subtitles for videofiles (DIVX,MPEG,AVI,VOB,etc) and DVD's \
                    using fast hashing.

homepage            https://www.subdownloader.net/
master_sites        https://launchpad.net/${name}/trunk/${branch}/+download/
distname            ${name}_${version}.orig
worksrcdir          ${name}-${version}

checksums           rmd160  7c2ba48fba76ab07a9ee1e4e3c788844bcef4b2c \
                    sha256  2f9ec46d1537cb5677b717dcaf5668cdc61a84456bc52178b40595759ba35655 \
                    size    1259520

depends_lib         port:python27

use_configure       no
build               {}

destroot {
    set myinstdir ${prefix}/libexec/${name}
    xinstall -d ${destroot}${myinstdir}
    file copy {*}[glob ${worksrcpath}/*] ${destroot}${myinstdir}
    reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python2.7|g" \
        ${destroot}${myinstdir}/run.py
    file attributes ${destroot}${myinstdir}/run.py -permissions 0755
    move ${destroot}${myinstdir}/${name}.1 ${destroot}${prefix}/share/man/man1
    ln -s ${myinstdir}/run.py ${destroot}${prefix}/bin/${name}
}

notes "
To use the progam, type: ${name} --cli

If you wish to use the graphical interface, you will also need to install\
the py27-pyqt4 port.
"

deprecated.upstream_support no
livecheck.type  none
