# -*- 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        beekeeper-studio beekeeper-studio 1.11.6 v
revision            0

homepage            https://beekeeperstudio.io

description         Cross platform SQL editor and database management app for \
                    Windows, Linux, and Mac.

long_description    Beekeeper Studio is a free and open source SQL editor and \
                    database manager. Beekeeper Studio is cross-platform, and \
                    available for Linux, Mac, and Windows. It features \
                    autocomplete SQL query editor with syntax highlighting, \
                    tabbed interface, so you can multitask, the ability to \
                    sort and filter table data to find just what you need, \
                    sensible keyboard-shortcuts, the ability to save queries \
                    for later, query run-history so you can find that one \
                    query you got working 3 days ago, and a default dark theme.

categories          databases
license             MIT
platforms           darwin
supported_archs     x86_64

maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  f9306bdbc2b24c2afa4b09c6979c0b4c3555b952 \
                    sha256  2ab76d361ee3b6db09e963bbe0c6e527905ab471ab8da00478bdc8421b261ac2 \
                    size    42414835

depends_build       port:yarn

build.env-append    CSC_IDENTITY_AUTO_DISCOVERY=false \
                    CXX=${configure.cxx}

use_configure       no
use_xcode           yes

build {
    # Set up all JS dependencies
    system -W ${worksrcpath} "${build.env} yarn --frozen-lockfile"

    # Build electron app
    system -W ${worksrcpath} \
        "${build.env} yarn run electron:build --mac dir --publish never"
}

destroot {
    copy ${worksrcpath}/dist_electron/mac/Beekeeper\ Studio.app \
         ${destroot}${applications_dir}
}

github.livecheck.regex  {([0-9.]+)}
github.tarball_from     archive
