#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=xfsprogs
pkgver=5.19.0
pkgrel=02
pkgdesc="XFS filesystem utilities w/o systemd"
arch=('x86_64')
url="https://xfs.org"
depends=('sh' 'util-linux-libs' 'icu' 'device-mapper' 'libinih' 'liburcu')
optdepends=('python: for xfs_scrub_all script'
            'smtp-forwarder: for xfs_scrub_fail script')
makedepends=(git
	device-mapper
	libinih
	liburcu
	automake
	autoconf
	gettext)
options=('!makeflags')
source=("git+https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git#tag=v${pkgver}")

build() {
  cd ${pkgname}-dev
  make configure
  export OPTIMIZER="-march=${CARCH/_/-} -O1"
  export DEBUG=-DNDEBUG
  ./configure --prefix=/usr --sbindir=/usr/bin
  make
}

package() {
  cd ${pkgname}-dev
  make DIST_ROOT="${pkgdir}" PKG_ROOT_SBIN_DIR="/usr/bin" install install-dev
  chown -R root "$pkgdir"
  chgrp -R root "$pkgdir"
  # add hack as we cannot set rootlibdir
  mv "${pkgdir}"/lib/libhandle.so* "${pkgdir}/usr/lib/"
  rm -rf "${pkgdir}/lib"
}

#---- license gpg-key sha256sums ----

license=('LGPL')

sha256sums=(SKIP)


