# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Christian Kohlstedde <christian+aur@kohlsted.de>
# Contributor: Mariusz Libera <mariusz.libera@gmail.com>
# Contributor: Alex 'AdUser' Z <ad_user@mail.ru>
pkgname=rdfind
pkgver=1.6.0
pkgrel=4
pkgdesc='Redundant data find - a program that finds duplicate files'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://rdfind.pauldreik.se'
license=('GPL-2.0-only')
depends=('nettle' 'glibc' 'gcc-libs')
makedepends=('git')
source=("git+https://github.com/pauldreik/rdfind.git?signed#tag=releases/${pkgver}")
validpgpkeys=("CC3C51BA88205B19728A6F07C9D9A0EA44EAE0EB")
b2sums=('96ca92d94e76a4014e874be35b94189c1f22fb00f1cdf06c2ac48e3b9d4ca1b589ec831f6f9059dd668d9d539f5adfab7b820eaaff70fb35a7624400445b999c')

prepare() {
  cd "${pkgname}"
  ./bootstrap.sh
}

build() {
  cd "${pkgname}"
  ./configure --prefix=/usr
  make 
}

check() {
  cd "${pkgname}"
  make check
}

package() {
  cd "${pkgname}"
  make DESTDIR="${pkgdir}/" install

  # documentation
  install -dm755 "${pkgdir}/usr/share/doc/${pkgname}"
  install -m644 AUTHORS ChangeLog README TODO \
          "${pkgdir}/usr/share/doc/${pkgname}"
}

