#!/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=reiserfsprogs
pkgver=3.6.27
pkgrel=04
pkgdesc="Reiserfs utilities"
arch=('x86_64')
url="https://www.kernel.org/"
depends=('util-linux')
replaces=(progsreiserfs)
conflicts=(progsreiserfs)
source=("https://www.kernel.org/pub/linux/kernel/people/jeffm/reiserfsprogs/v${pkgver}/${pkgname}-${pkgver}.tar.xz"
        reiserfsprogs-3.6.27-loff_t.patch)

prepare() {
  cd ${pkgname}-${pkgver}
  patch -p1 -i "$srcdir"/reiserfsprogs-3.6.27-loff_t.patch
  autoreconf -i
}

build() {
  cd ${pkgname}-${pkgver}
  CFLAGS+=' -fgnu89-inline'
  ./configure --prefix=/usr --sbindir=/usr/bin
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check
}

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

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

license=('GPL')

md5sums=('90c139542725efc6da3a6b1709695395'
         '77dd321df96be58a1fd636f25b1e3544')

sha256sums=(0e95b67fa7746a3c2d59145e9b9c2feb4a6be52853e83b497b182eae508e62e3  #  reiserfsprogs-3.6.27.tar.xz
	2d4e90d5e2b0610021d0c078f350e098d5573edccdf2864909aada83ed0473f9) #  reiserfsprogs-3.6.27-loff_t.patch

