summaryrefslogtreecommitdiff
path: root/repo/btrfs-progs/btrfs-progs.xibuild
blob: 7b80314841e35c454ff67c447965461db11ac547 (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
#!/bin/sh

NAME="btrfs-progs"
DESC="BTRFS filesystem utilities"

MAKEDEPS="linux-headers acl asciidoc attr autoconf automake e2fsprogs libtool lzo python util-linux xmlto zlib zstd eudev"

PKG_VER=5.16.2
SOURCE="https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v$PKG_VER.tar.xz"

prepare() {
	./autogen.sh
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
        --disable-documentation \
		--disable-backtrace
	make
}

package() {
	make -j1 DESTDIR="$PKG_DEST" install install_python

	mkdir -p "$PKG_DEST"/usr/share/doc/btrfs-progs
	install -m644 README.md CHANGES \
		"$PKG_DEST"/usr/share/doc/btrfs-progs

	mkdir "$PKG_DEST"/sbin
	local i; for i in btrfs btrfsck fsck.btrfs mkfs.btrfs; do
		mv "$PKG_DEST"/usr/bin/$i "$PKG_DEST"/sbin/
	done
	mv "$PKG_DEST"/usr/bin "$PKG_DEST"/usr/sbin

	install -Dm644 btrfs-completion \
		"$PKG_DEST"/usr/share/bash-completion/completions/btrfs
}