# -*- 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        acrogenesis macchanger 1.6.1 v
github.tarball_from archive
revision            0

categories          net security
license             MIT
maintainers         {i0ntempest @i0ntempest} openmaintainer

description         Change your mac address, for macOS/OS X
long_description    ${name} is A MAC address management tool for macOS that works with the\
                    latest macOS versions including Sequoia 15+.

homepage            https://acrogenesis.com/macchanger/

checksums           rmd160  65a194f28e2c79e45957d71be62f47af56df2c60 \
                    sha256  30c6a218ee590ba925e4f4ba816f07dd58108267cc6ad99808612ef50e5d5bb2 \
                    size    3724

set ruby_version    3.4
set ruby_version_mp [join [split ${ruby_version} "."] ""]
depends_run         port:ruby${ruby_version_mp}

post-patch {
    reinplace "s|#!/usr/bin/env ruby|#!${prefix}/bin/ruby${ruby_version}|" ${worksrcpath}/bin/${name}
}

use_configure       no
build {}

destroot {
    xinstall -m 0755 ${worksrcpath}/bin/${name} ${destroot}${prefix}/bin
}
