# $Id$

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

name            tablet-encode
license         Artistic
version         2.30
categories      multimedia
maintainers     ecronin openmaintainer
platforms       darwin
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
livecheck.type  regex
livecheck.url   https://garage.maemo.org/frs/?group_id=455
livecheck.regex tablet-encode-\(\[0-9\]+\.\[0-9\]+\)\.tar\.gz
checksums       md5     cc81a2a375724543cf40ea2ed97d3e6a \
                sha1    224b8fc7c86bbe5cd68d2a0172e3f1a27fb923a2 \
                rmd160  71aa43d56df5c70484dda3dd882033e8639ae8e0

depends_run     path:bin/perl:perl5 path:bin/mplayer:mplayer-devel

variant gui \
    description {GTK2 Graphical User Interface} {
    depends_run-append port:p5-gtk2
}

post-patch {
    reinplace "s|/usr/bin/perl|${prefix}/bin/perl|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
}