aboutsummaryrefslogtreecommitdiffstats
path: root/main/btrfs-progs/APKBUILD
blob: ada6fd1a4eeab5f62c482c6b965942233459e9e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=btrfs-progs
pkgver=4.15.1
pkgrel=0
pkgdesc="BTRFS filesystem utilities"
url="https://btrfs.wiki.kernel.org"
arch="all"
license="GPL-2.0-or-later"
depends=""
depends_dev="linux-headers"
makedepends="util-linux-dev bash attr-dev acl-dev e2fsprogs-dev zlib-dev
	lzo-dev asciidoc xmlto $depends_dev
	autoconf automake libtool"
subpackages="$pkgname-doc $pkgname-dev $pkgname-bash-completion:completion:noarch
	$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
	rm-ext2_ext_attr_entry_check.patch
	"
builddir="$srcdir/$pkgname-v$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	./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

	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
}

completion() {
	pkgdesc="Bash completion script for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	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
}

sha512sums="6e6a9799f6716bbf772d5f0c8069579815060db20d30807e12948e7274448bca09a12c385ea05a95afc23722d12067a8d99623ea0091dca8ae75ea646aa84b88  btrfs-progs-v4.15.1.tar.xz
9f726a9b29d3b03dc3318d176a407707bc2f91b57c4aa7d14ad5389b5494c8860fb7b3b65906272ad9ae4416bccefbaf21e58925d4b27aea0cbb255a82a99962  includes.patch
5c04ef0aa0390aa9b32fc8b8d3d0bfb16c61cb005eb70de8523f8eb709a2422960c1dea3ece11c7ae1442b538ea195b7eacba678a432e9bde7cb074392800af0  musl-compat.patch
3775878284b15ca4d4250bd0ff0429297e8914e5359133185c52f4454f83b43efcf36467f7190f8d6787c92f6a27556bb380c040fbb3192edde155b5cbbe4eee  rm-ext2_ext_attr_entry_check.patch"