# -*- 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                fdroidserver
version             0.4.0
revision            0
categories          devel net
maintainers         {eds.org:hans @eighthave}
license             AGPL-3+

description         Tools for creating and managing Android app repositories for F-Droid
long_description \
    F-Droid is an app store of FOSS \(Free and Open Source Software\) \
    applications for the Android platform. The F-Droid server tools \
    provide various scripts and tools that are used to maintain the \
    main F-Droid application repository. You can use these same \
    tools to create your own additional or alternative repository \
    for publishing, or to assist in creating, testing and submitting \
    metadata to the main repository.

homepage            https://f-droid.org
platforms           darwin

checksums           md5 b98635817b6305353beb7ebf639be3d3 \
                    rmd160 e0b6a91a3ed8692d61835e6e6b6ee0f2c3435662 \
                    sha256 89742f2e03e082c9d185835dbb4f166dade19a0e257b247a6e0bca3b4fd9b523

python.default_version  27

# TODO: package pyasn1_modules

depends_lib         port:libmagic \
                    port:libyaml \
                    port:py${python.version}-asn1 \
                    port:py${python.version}-asn1-modules \
                    port:py${python.version}-libcloud \
                    port:py${python.version}-magic \
                    port:py${python.version}-paramiko \
                    port:py${python.version}-Pillow \
                    port:py${python.version}-requests \
                    port:py${python.version}-setuptools \
                    port:py${python.version}-yaml

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} \
        README.md \
        ${destroot}${prefix}/share/doc/${name}/
    # hmm.. something is creating this dir, but its empty, so just remove it
    file delete ${destroot}${prefix}/share/doc/${name}/examples
    ln -s ${python.prefix}/share/doc/${name}/examples \
        ${destroot}${prefix}/share/doc/${name}/examples
}
