# Contributor: Valery Kartel # Contributor: Ɓukasz Jendrysik # Maintainer: Natanael Copa pkgname=btrfs-progs pkgver=4.16 pkgrel=1 pkgdesc="BTRFS filesystem utilities" url="https://btrfs.wiki.kernel.org" arch="all" license="GPL-2.0-or-later LGPL-3.0-or-later" depends="" depends_dev="linux-headers" makedepends="$depends_dev acl-dev asciidoc attr-dev autoconf automake bash e2fsprogs-dev libtool lzo-dev py3-setuptools python3-dev util-linux-dev xmlto zlib-dev" subpackages="$pkgname-doc $pkgname-dev $pkgname-bash-completion:bashcomp:noarch py-$pkgname:py $pkgname-libs $pkgname-extra" source="https://www.kernel.org/pub/linux/kernel/people/kdave/$pkgname/$pkgname-v$pkgver.tar.xz includes.patch musl-compat.patch " builddir="$srcdir/$pkgname-v$pkgver" prepare() { default_prepare ./autogen.sh } build() { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-backtrace \ --disable-zstd make } package() { cd "$builddir" make -j1 DESTDIR="$pkgdir" install install_python mkdir "$pkgdir"/sbin local i; for i in btrfs btrfsck fsck.btrfs mkfs.btrfs; do mv "$pkgdir"/usr/bin/$i "$pkgdir"/sbin/ done mv "$pkgdir"/usr/bin "$pkgdir"/usr/sbin } bashcomp() { pkgdesc="Bash completion script for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" install -D -m644 "$builddir"/btrfs-completion \ "$subpkgdir"/usr/share/bash-completion/completions/btrfs } py() { cd "$builddir" pkgdesc="Python bindings for $pkgname" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } extra() { depends="$pkgname" pkgdesc="BTRFS filesystem extra utilities" mkdir -p "$subpkgdir" mv "$pkgdir"/usr "$subpkgdir"/ rmdir "$subpkgdir"/usr/lib } sha512sums="3d794f890a7772c27c285410892b9de4c0629f6de6cd96e42d1e25c9263dd519d14428eaba75a3595f2d03a1154ffbbfe6a02449d7527a2ab6a1911a8736358e btrfs-progs-v4.16.tar.xz 6a41cdb5dae1983ff0682e152a00007b9a5d03e835195ec4f6ff1005ffceea9178cee672ef1d03c029941d3764b021f6c49b3b82cc4fd383920bdf4faed88d2a includes.patch 056704aa07433e5ae3e5158c668aec7535318613f84cebd4c70237aa253e5585d529cb535203ec6578e3ad9fc9f863e1cf498bb30deeec2d6d557d9318d3e947 musl-compat.patch"