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

go.setup            github.com/tdewolff/minify 2.24.8 v
revision            0

description         Go minifier for web formats.

long_description    \
    Minify is a minifier CLI written in Go. It can minify HTML5, CSS3, JS, JSON, SVG and XML.

categories          devel
installs_libs       no
license             MIT
maintainers         {@ZapDotZip gmail.com:zapdotzip} openmaintainer

checksums           ${distname}${extract.suffix} \
                        rmd160  d51c59fd2fec6a76e68a06a518b197dc613c2d6b \
                        sha256  bd3285a06d96f296129d961ac72c3872bc373f9b32a14039c0fb81bd6abe9cbe \
                        size    7769548

go.vendors          gopkg.in/yaml.v3 \
                        lock    v3.0.1 \
                        rmd160  e85ac1368fb7f9ef945b7fd7bd608a1f0d261c12 \
                        sha256  f3ea6be3f405ec25f8799773355aba54f8831d11f5315a01155bdc69b92eca7b \
                        size    91208 \
                    gopkg.in/check.v1 \
                        lock    20d25e280405 \
                        rmd160  412aa0d109919182ff84259e9b5bbc9f24d78117 \
                        sha256  233f8faf427ce6701ac3427f85c28bc6b6ae7cdc97a303a52873c69999223325 \
                        size    30360 \
                    golang.org/x/sys \
                        lock    v0.37.0 \
                        rmd160  ff25f6061e94810a81b7f7b180a2205b869d90f4 \
                        sha256  4bc9d9f2de7bb6b4473a544903108648f130c3ce68020464d8665e4aba8e5653 \
                        size    1531626 \
                    github.com/tdewolff/test \
                        lock    v1.0.11 \
                        rmd160  4cbe095642b04e477eeddbe435c4083190baafc0 \
                        sha256  71b183acdc8ac70986afd458b90bb9a612ff5de385713675ee1e826fa313a1ac \
                        size    3427 \
                    github.com/tdewolff/parse \
                        lock    v2.8.5 \
                        rmd160  cc42ee8822bbf7c24b199e5c4f8a6da930a5528e \
                        sha256  922d9578772b79f842b889aa824804a143a7555ab22ca8fd9c0d51a7a31a8c8b \
                        size    112707 \
                    github.com/tdewolff/argp \
                        lock    0f54527d2b1e \
                        rmd160  7313ff3472a84b7bdce6dc6b8e7b97dfce2203aa \
                        sha256  eb17f4c4ff0f8b3ed30280e32e3b36fe5af06876e257b380eb347a56f77d6ebf \
                        size    20433 \
                    github.com/pelletier/go-toml \
                        lock    v1.9.5 \
                        rmd160  82b54e63618f66f791ce83a86ec04b85b24daf96 \
                        sha256  335d53529bfead717c2c44454e05a2396918bba311e3262b8bcb295b7c8772fd \
                        size    106961 \
                    github.com/mattn/go-sqlite3 \
                        lock    v1.14.22 \
                        rmd160  51cca4f09f23a404613e3eb48b77a44f4d98814e \
                        sha256  02c8bc2780ff6f0b845e01efe0cfa006d8f85e48a06cd6c8566c21c3b88a644e \
                        size    2602371 \
                    github.com/lib/pq \
                        lock    v1.10.9 \
                        rmd160  beb0e233773f49d8d08ee991abf23bc8febf69d0 \
                        sha256  08610bf0370b202bee369b7303c3085e02c7f6fdfd42a3f58e8f033088151eea \
                        size    114528 \
                    github.com/jmoiron/sqlx \
                        lock    v1.4.0 \
                        rmd160  31cbbd492d0ff6b9910a91eb03ffac4c7a095206 \
                        sha256  13391150ebd301bf2c3f97424273943499ec8d362c0fe7316430c255b6de198f \
                        size    54560 \
                    github.com/go-sql-driver/mysql \
                        lock    v1.8.1 \
                        rmd160  f32a15ddd5c0a9e628bf1d6fa236f0865b1f1697 \
                        sha256  a3d9fcb9479ffb100441dee59ebcefeb6306f6dd3549f7c429b91c5e9399a80d \
                        size    105661 \
                    github.com/fsnotify/fsnotify \
                        lock    v1.9.0 \
                        rmd160  24b514b003e8a613b938e13f7df3ba60dc755499 \
                        sha256  46aaaf931594e32ce1e087da58dc8d3e27f0e34eaca38a9280f6c10a198d4166 \
                        size    73949 \
                    github.com/djherbis/atime \
                        lock    v1.1.0 \
                        rmd160  895c7d4dd8841c7dde34e2842715d75022fdce08 \
                        sha256  65d7b3933a59b2dc7ff25ee141e66680dd2a6142bdd84048b0430955296ef08d \
                        size    3142 \
                    filippo.io/edwards25519 \
                        repo    github.com/FiloSottile/edwards25519 \
                        lock    v1.1.0 \
                        rmd160  32e76862168e566190f9be95e5a88dcb10b3a6a2 \
                        sha256  a68a54423370e136bf03e4217d2fba807b4d041f873f6ebbcfc8ad4ba9925f5d \
                        size    47132

build.pre_args-append \
    -ldflags \"-s -w -X 'main.Version=${version}' \" -trimpath

build.args          -o ${worksrcpath}/cmd/${name}/${name} ./cmd/minify


destroot {
    xinstall -m 0755 ${worksrcpath}/cmd/${name}/${name} ${destroot}${prefix}/bin/
    xinstall -d -m 0755 ${destroot}${prefix}/etc/bash_completion.d
    copy ${worksrcpath}/cmd/${name}/bash_completion ${destroot}${prefix}/etc/bash_completion.d/${name}
}
