# -*- 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                debianutils
version             5.24
revision            0
categories          sysutils
license             GPL-2+
maintainers         {raimue @raimue} openmaintainer
description         Miscellaneous utilities from Debian
long_description \
    ${name} is a collection of miscellaneous utilities developed by the Debian \
    project for their Linux distribution. This port provides the utilities \
    run-parts and tempfile.

# There are other tools provided by upstream, but they have been excluded from
# this port for the following reasons:
#   add-shell, remove-shell  Helper tool for debian packages
#   installkernel            Only useful for building Linux kernel
#   ischroot                 Does not work on Mac OS X
#   savelog                  Excluded due to unknown SMAIL GENERAL PUBLIC LICENSE,
#                            see http://packages.debian.org/changelogs/pool/main/d/debianutils/current/debianutils.copyright
#   which                    Unnecessary, /usr/bin/which is provided by the operating system

homepage            https://tracker.debian.org/pkg/debianutils
master_sites        debian:d/${name}
distname            ${name}_${version}
worksrcdir          ${name}-${version}
use_xz              yes

checksums           rmd160  c78575610190bae01e3ad2e140e89a54b6a58695 \
                    sha256  bf79c301ad48e82ddb09d8c0770f6d44294ee9529ae5e54164072f7bf5c57016 \
                    size    83012

use_autoreconf      yes

build.target        run-parts tempfile

destroot {
    xinstall -W ${worksrcpath} run-parts   ${destroot}${prefix}/sbin
    xinstall -W ${worksrcpath} run-parts.8 ${destroot}${prefix}/share/man/man8
    xinstall -W ${worksrcpath} tempfile    ${destroot}${prefix}/bin
    xinstall -W ${worksrcpath} tempfile.1  ${destroot}${prefix}/share/man/man1
}

# alignof is C23. Not necessary to build
configure.checks.implicit_function_declaration.whitelist-append alignof
configure.checks.implicit_int \
                    no

livecheck.type      regex
livecheck.regex     ${name}_(\\d+(?:.\\d+)+).dsc
