# Contributor: Valery Kartel # Contributor: Ɓukasz Jendrysik # Maintainer: Natanael Copa pkgname=btrfs-progs pkgver=4.5.3 pkgrel=1 pkgdesc="BTRFS filesystem utilities" url="https://btrfs.wiki.kernel.org/" arch="all" license="GPL2" depends="" makedepends="util-linux-dev bash attr-dev acl-dev e2fsprogs-dev zlib-dev lzo-dev asciidoc xmlto linux-headers autoconf automake libtool" install= subpackages="$pkgname-doc $pkgname-dev $pkgname-bash-completion:completion $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() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done ./autogen.sh } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-backtrace \ || return 1 make || return 1 } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install || return 1 mkdir "$pkgdir"/sbin 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 } completion() { pkgdesc="Bash completion script for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" arch="noarch" install -Dm644 "$_builddir"/btrfs-completion \ "$subpkgdir"/usr/share/bash-completion/completions/btrfs } extra() { depends="$pkgname" pkgdesc="BTRFS filesystem extra utilities" mkdir -p "$subpkgdir" mv "$pkgdir"/usr "$subpkgdir" rmdir "$subpkgdir"/usr/lib || return 1 } md5sums="3feb593cb52df7570769559366d5e320 btrfs-progs-v4.5.3.tar.xz a79fe97241a26ec2a4be9fc566fa8e29 includes.patch 204ac1381fc0c373bc809d6a453615f2 musl-compat.patch" sha256sums="e6e79608d81ccda62ad877c20e4d0868dc68e570ba42f4c94e66bf5e8ee0ebd3 btrfs-progs-v4.5.3.tar.xz dc66938029c887fd29e69ce53f8acc8ac0f01fa49fede3b08c00f2f7acdb1f2a includes.patch fa678596c2979f929447f2fdface52823d9bea93d0f49d086ada07b7e57bae34 musl-compat.patch" sha512sums="7bb15728577cdc56773e87583196ed36e15a4c417f03816e8a101506070e667b8e51f66fcf98095ddc20c9ce10da0b78de1171e9c8a6cb20a4811fd35d508961 btrfs-progs-v4.5.3.tar.xz 2040092c94096da283ca69ec0dd910ebd5329840df86e607226cc054e8b29112720c798b63f9630e35ed28c7c057bb433b09d8aec8df8c4793a6f1ecaa8be846 includes.patch 5c04ef0aa0390aa9b32fc8b8d3d0bfb16c61cb005eb70de8523f8eb709a2422960c1dea3ece11c7ae1442b538ea195b7eacba678a432e9bde7cb074392800af0 musl-compat.patch"