# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           perl5 1.0

name                tablet-encode
license             Artistic-1
version             2.30
revision            6
categories          multimedia
platforms           any
supported_archs     noarch
maintainers         nomaintainer
description         Transcoding video files for Nokia Internet Tablets
long_description    As the Nokia Internet Tablets have relatively slow \
                    processors, and relatively little storage space it is \
                    a good idea to "transcode" your videos to a smaller, \
                    more suitable format for watching them.
homepage            http://mediautils.garage.maemo.org/tablet-encode.html
master_sites        https://garage.maemo.org/frs/download.php/6892

checksums           rmd160  71aa43d56df5c70484dda3dd882033e8639ae8e0 \
                    sha256  ce1f413c111429db14f41ca611297896357065d0934b7dce9e341a77e178f557

perl5.branches      5.34

depends_run         port:perl${perl5.major} \
                    path:bin/mplayer:mplayer-devel

variant gui description {GTK2 Graphical User Interface} {
    depends_run-append  port:p${perl5.major}-gtk2
}

post-patch {
    reinplace "s|/usr/bin/perl|${perl5.bin}|g" \
        ${worksrcpath}/tablet-encode
}

use_configure   no

build           {}

destroot {
    xinstall -m 755 ${worksrcpath}/tablet-encode \
        ${destroot}${prefix}/bin/tablet-encode
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 ${worksrcpath}/README.txt \
        ${destroot}${prefix}/share/doc/${name}/README.txt
}

livecheck.type      regex
livecheck.url       https://garage.maemo.org/frs/?group_id=455
livecheck.regex     tablet-encode-\(\[0-9\]+\.\[0-9\]+\)\.tar\.gz
