# -*- 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                lunzip
version             1.14
categories          archivers
license             GPL-2+
maintainers         nomaintainer
description         Decompressor for lzip files
long_description    Lunzip is a decompressor for lzip files. It is written in C and its   \
                    small size makes it well suited for embedded devices or software      \
                    installers that need to decompress files but do not need compression  \
                    capabilities. Lunzip is fully compatible with lzip-1.4 or newer.
homepage            https://www.nongnu.org/lzip/lunzip.html
master_sites        savannah:lzip/lunzip

checksums           rmd160  e85c2b0b15b9bfa0a82550d9fa8b14d569aec251 \
                    sha256  70a30ca88c538b074a04a6d5fa12a57f8e89febcb9145d322e9525f3694e4cb0 \
                    size    69284

variant universal   {}

# respect default optimization
configure.cflags-replace -Os -O2

configure.args      CC="${configure.cc}" \
                    CFLAGS="${configure.cflags} [get_canonical_archflags cxx]" \
                    CPPFLAGS="${configure.cppflags}" \
                    LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    file mkdir ${docdir}
    xinstall -m 644 -v -W ${worksrcpath} \
      AUTHORS ChangeLog COPYING NEWS ${docdir}
}

livecheck.type      regex
livecheck.url       https://download.savannah.gnu.org/releases/lzip/lunzip/?C=M&O=D
livecheck.regex     ${name}-(\[-0-9.\]+)\\.tar\\.gz
