APP=parted
VERSION=3.2
BUILD=1sml
SM_NOAUTOCONFSITE=1
HOMEPAGE='https://www.gnu.org/software/parted/'
DOWNLOAD='https://ftp.gnu.org/gnu/parted/parted-3.2.tar.xz'
DESC="GNU disk partitioning tool"
REQUIRES="eudev util-linux lvm"

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

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

  patch -p1 < $SRCDIR/parted-3.2-xfs.patch

  CFLAGS="-D_GNU_SOURCE -Dloff_t=off_t $CFLAGS -include sys/sysmacros.h" \
  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --sbindir=/bin \
    --enable-threads=posix \
    --disable-nls \
    --disable-static 

  make
  make install DESTDIR=$PKG

  cp COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
b7e882e2641d301b9e85b392dd65d145f53f9ddc7722d5712d34897592e1e9add088902a00121a8c8c9706750304690d1f096e36ffa6ca8fba68ff04e8e5e2fb  parted-3.2.tar.lz
2aaf39c84dd630df1fb281cf3d13dc9b14a7d720c4e3a2c6c1052cc84a1bd4fbbd38d9ec521afb3c6dc514b63c19483b5ff3bef4bf3e778fcbdb843c7c5a6906  parted-3.2-xfs.patch
"
