# -*- 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        libimobiledevice ideviceinstaller 1.1.1
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            2

categories          devel

license             GPL-2+
maintainers         {ijackson @JacksonIsaac} {i0ntempest @i0ntempest} openmaintainer

description         Manage apps of iOS devices.

long_description    ideviceinstaller is a tool to interact with the installation_proxy \
    of an iOS device allowing to install, upgrade, uninstall, archive, restore \
    and enumerate installed or archived apps. \
    It makes use of the libimobiledevice library that allows communication \
    with iOS devices.

homepage            https://www.libimobiledevice.org/

checksums           rmd160  4f069cefd54a4078fd2af2fcf74fe27eae4307ab \
                    sha256  66162abb3865fe38d1dddba4f4e26b28bd54579094b0f601ae65b2f2178afbb7 \
                    size    21918

patchfiles          patch-no-Werror.diff

depends_build-append \
                    port:autoconf \
                    port:automake \
                    port:libtool \
                    port:pkgconfig

depends_lib         port:libimobiledevice \
                    port:libplist \
                    port:libzip \

configure.cmd       ./autogen.sh

subport ideviceinstaller-devel {
    github.setup    libimobiledevice ideviceinstaller 14b0bfa9161407bc15d2065bcc91e6ed248c91ca
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    version         20200615

    checksums       rmd160  cad7b5a0083d790bc9b68513f9779a3ec25da7c5 \
                    sha256  1bd7f6486f4af88ded11055c189b8aeb9349df947f67297e024299c78d1f3037 \
                    size    21917

    depends_lib-replace port:libimobiledevice \
                        port:libimobiledevice-devel
    depends_lib-replace port:libplist port:libplist-devel

    conflicts       ideviceinstaller

    livecheck.url   ${github.homepage}/commits/${github.livecheck.branch}.atom
}

if {${subport} eq ${name}} {
    conflicts       ideviceinstaller-devel
}
