# -*- 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               makefile 1.0
PortGroup               muniversal 1.1

name                    gptfdisk
version                 1.0.10
revision                0
checksums               rmd160  ac3a7771fcb1e6706eb2098d21218db70fcdcbde \
                        sha256  2abed61bc6d2b9ec498973c0440b8b804b7a72d7144069b5a9209b2ad693a282 \
                        size    220787

categories              sysutils
license                 GPL-2+
maintainers             {mail.ru:nano103 @nano103} openmaintainer
description             GUID partition table fdisk (gdisk)
long_description        GPT fdisk (gdisk) is a disk partitioning tool loosely modeled on Linux fdisk, \
                        but used for modifying GUID Partition Table (GPT) disks. \
                        The related FixParts utility fixes some common problems \
                        on Master Boot Record (MBR) disks.

homepage                https://www.rodsbooks.com/gdisk/
master_sites            sourceforge:project/gptfdisk/gptfdisk/${version}

patch.pre_args-replace  -p0 -p1
patchfiles              patch-Makefile.mac.diff

makefile.prefix_name    prefix
makefile.override-append \
                        PREFIX

depends_lib-append      port:ncurses \
                        port:popt

build.args              -f Makefile.mac

destroot {
    xinstall -m 0755 -W ${worksrcpath} cgdisk fixparts gdisk sgdisk ${destroot}${prefix}/bin

    xinstall -d ${destroot}${prefix}/share/man/man8
    xinstall -m 0644 -W ${worksrcpath} cgdisk.8 fixparts.8 gdisk.8 sgdisk.8 ${destroot}${prefix}/share/man/man8
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 ${worksrcpath}/COPYING ${destroot}${prefix}/share/doc/${name}
}
