# 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.7.0
pkgrel=1
pkgdesc='Redundant data find - a program that finds duplicate files'
arch=('x86_64' 'aarch64')
url='https://rdfind.pauldreik.se'
license=('GPL-2.0-only')
depends=(
  gcc-libs
  glibc
  nettle
  xxhash)
makedepends=('git')
source=("git+https://github.com/pauldreik/rdfind.git?signed#tag=releases/${pkgver}")
validpgpkeys=("CC3C51BA88205B19728A6F07C9D9A0EA44EAE0EB")
b2sums=('1224c08bf6148c25f4605266a23b7cf04ef60f792a73ae4165400c01eb1ca9b059bdfaf0b70b6512684727fb4470d3bb5159759eecab12dea70c6024dba3a4d5')

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}"
}

