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

name                jumpcut
categories          aqua
maintainers         {judaew @judaew} openmaintainer
license             MIT

description         Jumpcut: Minimalist Clipboard Buffering for OS X
long_description    Jumpcut is an application that provides “clipboard \
                    buffering” — that is, access to text that you’ve cut or \
                    copied, even if you’ve subsequently cut or copied \
                    something else. The goal of Jumpcut’s interface is to \
                    provide quick, natural, intuitive access to your \
                    clipboard’s history.
homepage            https://snark.github.io/jumpcut/

variant universal {}
default_variants    +universal

if {![variant_isset universal]} {
    pre-fetch {
        ui_error "${name} port uses pre-built binary which contains several\
            architectures. Please do not install this port without the\
            +universal variant."
        return -code error "Try running `port install ${name} +universal`"
    }
}

if {${os.major} < 14 } {
    version             0.63
    revision            0

    supported_archs     i386 ppc
    master_sites        sourceforge:project/jumpcut/jumpcut/${version}
    distname            Jumpcut_${version}
    extract.suffix      .tgz

    checksums           rmd160  4812eddf7f6efd116a511192dae398682a68beba \
                        sha256  19c84eefbc7f173af45affe3a9ca6fd9ec58d9bdf6bacef165085e63e82d54e1 \
                        size    530939
} else {
    PortGroup           github 1.0

    github.setup        snark jumpcut 0.84 v
    github.tarball_from releases
    revision            0

    supported_archs     arm64 x86_64
    distname            Jumpcut-${version}
    use_bzip2           yes

    checksums           rmd160  c6cd23b5b70841b1e9ec48a9a75f677585140e5f \
                        sha256  ef43d3fee801188a3f6fb9ba14bf738aa2d103bd4986b390e9820e7390c6178c \
                        size    8741839
}

extract.mkdir       yes
use_configure       no
build {}

destroot {
        copy ${worksrcpath}/Jumpcut.app ${destroot}${applications_dir}
}

livecheck.type      regex
livecheck.url       https://snark.github.io/jumpcut/
livecheck.regex     {<strong>([0-9.]+)</strong>}
