aboutsummaryrefslogtreecommitdiffstats
path: root/main/btrfs-progs/APKBUILD
blob: eefce9e2d54e317ff0eb7462be2aa7f2a6fd3894 (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
78
79
80
81
82
83
84
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=btrfs-progs
pkgver=4.4.1
pkgrel=0
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
	0001-use-pthread_join-instead-of-pthread_tryjoin_np.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 \
		--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="8380dbb4accf5c39c93576ff06ed9136  btrfs-progs-v4.4.1.tar.xz
a79fe97241a26ec2a4be9fc566fa8e29  includes.patch
204ac1381fc0c373bc809d6a453615f2  musl-compat.patch
f8a34b011e83307b71ca62a319d70a49  0001-use-pthread_join-instead-of-pthread_tryjoin_np.patch"
sha256sums="9964e3ae4fb64692e109ddd733de4554e708348ffa18f0fc16a0cbd4bf40a8fc  btrfs-progs-v4.4.1.tar.xz
dc66938029c887fd29e69ce53f8acc8ac0f01fa49fede3b08c00f2f7acdb1f2a  includes.patch
fa678596c2979f929447f2fdface52823d9bea93d0f49d086ada07b7e57bae34  musl-compat.patch
e1264e4bbe910ee92a45d2a8afe60f812e986b68ccf153559c3e090031256bf5  0001-use-pthread_join-instead-of-pthread_tryjoin_np.patch"
sha512sums="3086e2e0385d9e14edcfa25e1aee1ed98087dd5b91a66aa450786c932d79841b5c4ee3f9a40b8fdecee0ba1e386196b89679d28e58e4924ce66cd78c5e3c0d4a  btrfs-progs-v4.4.1.tar.xz
2040092c94096da283ca69ec0dd910ebd5329840df86e607226cc054e8b29112720c798b63f9630e35ed28c7c057bb433b09d8aec8df8c4793a6f1ecaa8be846  includes.patch
5c04ef0aa0390aa9b32fc8b8d3d0bfb16c61cb005eb70de8523f8eb709a2422960c1dea3ece11c7ae1442b538ea195b7eacba678a432e9bde7cb074392800af0  musl-compat.patch
efce71c7cc550e79c02e886af7b0130dfbdac1b46061d7dca5f0f5a5c39ef46dd0f9ff9e4c33cf2a827e498e7b8c67f0e8c916f7e3097a386e4573e6ca9732c4  0001-use-pthread_join-instead-of-pthread_tryjoin_np.patch"