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

github.setup            folkertvanheusden rsstail 2.2 v
github.tarball_from     archive

categories              net
license                 GPL-2
homepage                https://www.vanheusden.com/rsstail
maintainers             {sethm.id.au:dev @McDaMastR} \
                        openmaintainer

description             Tail for RSS feeds
long_description        RSSTail is more or less an rss reader: it monitors an \
                        rss-feed and if it detects a new entry it'll emit only \
                        that new entry.

depends_lib-append      port:libiconv \
                        port:libmrss

checksums               rmd160  91da05bbc26f950dd1d3a6a06837fa78c56a1b32 \
                        sha256  df4ec84b4f9c1c01ce4fa6bbe740cf02bcdefaab8af019c5705770b682c0b328 \
                        size    12964

# Needed for get_canonical_archflags
variant universal {}

use_configure           no

compiler.c_standard     2011

configure.cflags-append {*}[get_canonical_archflags cc]
configure.cppflags-append \
                        -DVERSION="${version}"
configure.ldflags-append \
                        -liconv \
                        -lmrss \
                        {*}[get_canonical_archflags ld]

build.args-append       CC=${configure.cc} \
                        CFLAGS='${configure.cflags}' \
                        CPPFLAGS='${configure.cppflags}' \
                        LDFLAGS='${configure.ldflags}'

destroot.args-append    prefix=${destroot}${prefix}

post-destroot {
    set destdocdir  ${destroot}${prefix}/share/doc/${name}

    xinstall -d ${destdocdir}
    xinstall -W ${worksrcpath} -m 644 \
        LICENSE \
        README.md \
        ${destdocdir}
}
