# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       makefile 1.0
PortGroup       github 1.0

github.setup    julman99 eatmemory 0.1.10 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision        0
categories      sysutils
maintainers     {i0ntempest @i0ntempest} openmaintainer
license         MIT

description     Simple utility to allocate memory on a computer
long_description \
                Simple C program to allocate memory from the command-line. Useful to test programs or systems under \
                high memory usage conditions.

checksums       rmd160  f7f7bdac9cfaab9e80b038372c31a7f7dfe4bbdc \
                sha256  b8f9d4191f85d62ce4fc37edd6dfd121307e5ecfd7fcef377db3bb04adf7de07 \
                size    12170

makefile.override-append \
                PREFIX

post-patch {
    reinplace "s|INSTALL_DIR := \$(PREFIX)/bin|INSTALL_DIR := \$(DESTDIR)\$(PREFIX)/bin|" ${worksrcpath}/Makefile
}

post-destroot {
    file mkdir ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} README.md LICENSE ${destroot}${prefix}/share/doc/${name}
}
