aboutsummaryrefslogtreecommitdiffstats
path: root/main/xfsprogs/APKBUILD
blob: f058eecb3e506fa6f0b720f5c5703df54409af4b (plain) (blame)
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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfsprogs
pkgver=5.12.0
pkgrel=0
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 inih-dev"
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
	missing-signal.h.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="
c444d468b4eb4addad4669e0e32f827d5ea82cc60e29d7fbda8824d9e1b0f915214b08548ccacc5dd0ab92ef37aabb2bee2f41e514487a69832b0e76918db054  xfsprogs-5.12.0.tar.gz
080161b211e20277e44f714961b36064536bb5cce72a6f93fef4996e296a3953d33c1a066ef371ccd5551622357105f9be9086ef917386f5d43f6a211b0bd7c9  fix-mmap.patch
bc7971207a296d8112f8993f6a266533135aae59a4438bb511f472931c37b8ce3033c597d67abbd3664f4405317aeb049e747c1811c9495c1a24d98935f799cc  musl-MAP_SYNC-fix.patch
3dc132c45d93eeefe06ad3d53c39f325f4b003e3a230d5961599f7dac2026360ff57820be351b945385bfe1d6669cb182706696f59ae8d23f7c73dd7fe8d092a  missing-signal.h.patch
"