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

name                py-urlwatch
version             2.17
revision            0

platforms           darwin
supported_archs     noarch
license             BSD
maintainers         nomaintainer

description         a tool for monitoring webpages for updates
long_description	\
    urlwatch helps you watch URLs and get notified \(via email or in your \
    terminal\) of any changes. The change notification will include the URL \
    that has changed and a unified diff of what has changed, and can also \
    filter content via hooks, remove noise (always-changing website parts), \
    etc.

homepage            https://thp.io/2008/urlwatch/
master_sites        pypi:[string index ${python.rootname} 0]/${python.rootname}
distname            urlwatch-${version}

checksums           rmd160  10fb8516a09b1f00299558aa743ce2ad18210403 \
                    sha256  08f51c7ffe7489c0be7a6c54855e074da65131714e4b6c622e4cfb107ef7ea78 \
                    size    44178

python.versions     27 35 36 37 38

if {${name} ne ${subport}} {
    if {${python.version} eq 27} {
        version     1.18
        revision    0
        distname    urlwatch-${version}
        checksums   rmd160  825cfef05c8721844687b46cbd812ccfa648d0fe \
                    sha256  6b17411b6658f3aeb5839d1b32458f020ce40ee1e62a3d40387a2622fa731824 \
                    size    14987

        depends_lib-append \
                    port:py${python.version}-futures \
                    port:py${python.version}-keyring
    } else {
        depends_lib-append \
                    port:py${python.version}-appdirs \
                    port:py${python.version}-codestyle \
                    port:py${python.version}-cssselect \
                    port:py${python.version}-keyring \
                    port:py${python.version}-lxml \
                    port:py${python.version}-minidb \
                    port:py${python.version}-requests \
                    port:py${python.version}-setuptools \
                    port:py${python.version}-yaml

        depends_lib-append \
                    port:py${python.version}-nose

        test.run    yes
        test.cmd    nosetests-${python.branch}
        test.target
        test.env    PYTHONPATH=${worksrcpath}/build/lib

        post-destroot {
            set docdir ${prefix}/share/doc/${subport}
            xinstall -d ${destroot}${docdir}
            xinstall -m 0644 -W ${worksrcpath} README.md COPYING \
               CHANGELOG.md ${destroot}${docdir}
        }
    }

    livecheck.type  none
}
