APP=gptfdisk
VERSION=1.0.5
BUILD=1sml
HOMEPAGE='http://sourceforge.net/projects/gptfdisk/'
DOWNLOAD='https://sourceforge.net/projects/gptfdisk/files/gptfdisk/1.0.5/gptfdisk-1.0.5.tar.gz'
DESC="GPT fdisk utilities"
REQUIRES="gcc-libs netbsd-curses popt util-linux"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION 
  fixbuilddirpermissions

  sed -i '/^#include /s|ncursesw/||' gptcurses.cc
  make

  for f in cgdisk gdisk sgdisk fixparts ; do
    install -Dm 755 $f $PKG/bin/$f
    install -Dm 644 $f.8 $PKG/share/man/man8/$f.8
  done  

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
3d3a59e3488dd3d6bda5d103b9ad8b7936752210346b9787ddc936681498fba90577b6ae950c471d09a01bf6405fce32038ff1777c52db0b21e5277737fe3703  gptfdisk-1.0.5.tar.gz
"
