# -*- 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: Portfile 88435 2012-01-02 10:15:05Z ryandesign@macports.org $

PortSystem 1.0

name            nzbget
version         0.7.0
revision        2
categories      net
license         GPL-2+
maintainers     cal openmaintainer

description     binary newsgrabber
long_description \
	A command-line based binary newsgrabber for Linux, Unix, \
	and Mac OS X supporting nzb-files.

homepage        http://sourceforge.net/projects/nzbget/
platforms       darwin
master_sites    sourceforge:project/nzbget/nzbget-stable/${version}

checksums       md5     27971846aba75f5e312d80dce7edbc5d \
                sha1    e47cfcc37adbb756f4b449914cbfc6dcaaeebaec \
                rmd160  b8ff4d454a51f5d1a5b4246437adad57c918500c

depends_build   port:pkgconfig
depends_lib     port:libsigcxx2 \
                port:gnutls \
                port:libpar2 \
                port:libxml2

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

if {${configure.compiler} == "clang"} {
    configure.compiler llvm-gcc-4.2
}

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.example ${destroot}${docdir}
}

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

livecheck.distname  nzbget-stable
