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

PortSystem          1.0

name                nzbget
version             14.1
revision            2
checksums           sha256  a16b816b61f7035cc373e9b77094ca474d5b7b7f7ceff5fa8818249181db4b18 \
                    rmd160  fb7c13e802b27502075c0dbbaf4eacb28a806b9a

categories          net
maintainers         nomaintainer
platforms           darwin

license             GPL-2+
description     \
    NZBGet is a cross-platform binary newsgrabber for nzb files, written in C++.
long_description \
    ${description} \
    It supports client/server mode, automatic par-check/-repair and \
    web-interface. NZBGet requires low system resources and runs great on \
    routers, NAS-devices and media players.

homepage            http://nzbget.sourceforge.net
master_sites        sourceforge

depends_build       port:pkgconfig
depends_lib         port:gnutls \
                    port:libgcrypt \
                    port:libxml2 \
                    port:ncurses \
                    port:zlib

configure.args      --with-tlslib=GnuTLS \
                    --with-libgnutls-includes=${prefix}/include/gnutls \
                    --with-libgnutls-libraries=${prefix}/lib \
                    --mandir=${prefix}/share/man

post-destroot {
    set docdir ${prefix}/share/doc/${name}-${version}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING INSTALL NEWS README \
        nzbget.conf ${destroot}${docdir}
}

notes \
    "An example configuration file has been installed at\
    ${prefix}/share/doc/${name}-${version}/nzbget.conf"

livecheck.regex      "/[quotemeta ${name}-stable]/(\[a-zA-Z0-9.\]+\.\[a-zA-Z0-9.\]+)/"