aboutsummaryrefslogtreecommitdiffstats
path: root/main/xfsprogs/APKBUILD
blob: 5c3de20b7b6b8ddc56f0c6f325e1f9fbfafab024 (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfsprogs
pkgver=5.6.0
pkgrel=1
pkgdesc="XFS filesystem utilities"
url="https://xfs.org/index.php/Main_Page"
arch="all"
license="LGPL-2.1-or-later"
makedepends="linux-headers attr-dev util-linux-dev bash gzip python3"
options="!check"  # no test suite
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-extra"
source="https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-$pkgver.tar.gz
	fix-mmap.patch
	musl-MAP_SYNC-fix.patch
	"

build() {
	export DEBUG=-DNDEBUG
	export OPTIMIZER="$CFLAGS"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sbindir=/sbin \
		--libexecdir=/usr/lib \
		--enable-gettext=no
	make SHELL=/bin/bash
}

package() {
	make -j1 DIST_ROOT="$pkgdir" install install-dev
	find "$pkgdir" -name *.la -delete
	mv "$pkgdir"/sbin "$pkgdir"/usr
	mkdir -p "$pkgdir"/sbin
	for i in mkfs.xfs fsck.xfs xfs_repair; do
		mv "$pkgdir"/usr/sbin/$i "$pkgdir"/sbin/
	done
	chown -R root:root "$pkgdir"/*
}

extra() {
	depends="$pkgname python3" # python3 for xfs_scrub_all
	pkgdesc="XFS filesystem extra utilities"
	mkdir -p "$subpkgdir"
	rm -rf "$pkgdir"/lib "$pkgdir"/usr/lib
	mv "$pkgdir"/usr "$subpkgdir"/
}

sha512sums="ee96e0789657c4a5dc5710e472957e861e7aab65eb99f30c9598bc4bb3f2c998b27a4ed0112bae311b1a9e0a4b7dc9dbbdc3089da40405a3f30668a25ded9969  xfsprogs-5.6.0.tar.gz
080161b211e20277e44f714961b36064536bb5cce72a6f93fef4996e296a3953d33c1a066ef371ccd5551622357105f9be9086ef917386f5d43f6a211b0bd7c9  fix-mmap.patch
bc7971207a296d8112f8993f6a266533135aae59a4438bb511f472931c37b8ce3033c597d67abbd3664f4405317aeb049e747c1811c9495c1a24d98935f799cc  musl-MAP_SYNC-fix.patch"