# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Marco Cilloni <krnlpk@gmail.com>

pkgname=exfatprogs
pkgver=1.2.5
pkgrel=1.1
pkgdesc='exFAT filesystem userspace utilities for the Linux Kernel exfat driver'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://github.com/exfatprogs/exfatprogs'
license=('GPL2')
depends=('glibc')
provides=('exfat-utils')
conflicts=('exfat-utils')
source=("https://github.com/exfatprogs/exfatprogs/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
b2sums=('46780d98055b48cd4a5943337bcfcc70f43fcf66ad8c2a6d81f11e6f63111665e55e5bda87f7949bdb7fe98ac27acb9a0dc457dcdfac22dfb671b190710d7113')

prepare() {
  cd exfatprogs-${pkgver}
  ./autogen.sh
}

build() {
  cd exfatprogs-${pkgver}
  ./configure --prefix=/usr --sbindir=/usr/bin
  make
}

package() {
  cd exfatprogs-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 -t "${pkgdir}"/usr/share/man/man8 */*.8
}
