# Maintainer: Leonidas Spyropoulos <artafinde at archlinux dot org>
# Contributor: Maurizio D'Addona <mauritiusdadd@gmail.com>
# Contributor: Mathieu Pasquet <mathieui@mathieui.net>
# Contributor: Bernhard Walle <bernhard.walle@gmx.de>
# Contributor: Michael Eckert <michael.eckert@linuxmail.org>
# Contributor: Guilherme G. Piccoli <gpiccoli@igalia.com>

pkgname=makedumpfile
pkgver=1.7.8
pkgrel=1
pkgdesc="A tool to generate smaller dumpfiles from kdump memory dumps"
license=('GPL-2.0-only')
depends=('perl' 'libelf' 'zstd')
makedepends=('git')
arch=('x86_64' 'aarch64')
url="https://github.com/makedumpfile/makedumpfile"
source=("git+$url.git?signed#tag=${pkgver}")
sha256sums=('bebb8a8d4db53d8218a26b5a395d1423a34e57db89bcf94768a2edffa7d6c0c6')
validpgpkeys=(
  'F4BA97F873AB047F217F8D16B0E0CE20E95D17F5' # Kazuhito Hagio <k-hagio-ab@nec.com>
  '60C5A596A37CDE6C357C5C623136D252B5E85FA9' # Kazuhito Hagio <k-hagio@ab.jp.nec.com>
  'F4D1A09161401A7E773BA02A0A56B268DCE35849' # YAMAZAKI Masamitsu <yamazaki-msmt@nec.com>
)

build() {
  cd "${pkgname}"
  make -O \
    LINKTYPE=dynamic \
    USEZSTD=on \
    V=1
}

package() {
  cd "${pkgname}"
  make install DESTDIR="${pkgdir}"
  mv "${pkgdir}/usr/sbin" "${pkgdir}/usr/bin"
}

# vim:set ts=2 sw=2 et:
