# -*- 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.15
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  ad20ae9f944911a3f6e1c3aeeadc0ade5a579212 \
                    sha256  fdb930b87672a238a54c4b86d63df1c86038ff577d512adbc8e2c754c046d8f2 \
                    size    59612

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
