#!/usr/bin/env bash
name='btrfs-progs'
release='5'
version='6.9.2'
url='https://github.com/storaged-project/libblockdev'
description='A library for manipulating block devices'
email='bayramk@gmail.com'
maintainer='bk'
license=('GPLv3')
source=("https://github.com/kdave/btrfs-progs/archive/refs/tags/v${version}.tar.gz")
depends=(e2fsprogs zlib libgcrypt eudev)
makedepends=()
sha256sums=('2a6b7b87cc80c9c26bc775d2014510e9c05e59098234bee29f7158484bad2a73')
group=(sys.fs)
uses=()
arch=('x86_64')

install=btrfs-progs.install
options=(!staticlibs)

cd $name-$version

setup(){
	./autogen.sh
	./configure --prefix=/usr \
            --libdir=/usr/lib64/\
            --with-crypto=libgcrypt \
            --disable-zstd \
            --disable-documentation
}

build(){
    make $jobs
}

package(){
  make DESTDIR="$DESTDIR" install install_python
  # install bash completion (FS#44618)
  install -Dm644 btrfs-completion "$DESTDIR/usr/share/bash-completion/completions/btrfs"
}

