# -*- 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.0 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  608a74bf25afffb081fc8e12d879ca4e2aafe260 \
                    sha256  c7e70a8d432f9b7e5a6c6a8162e99dfa506e86e0ab65c18244f47f222b5f5bd4 \
                    size    3773

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
}
