APKBUILD 1.7 KB
Newer Older
1
# Contributor: Valery Kartel <valery.kartel@gmail.com>
Natanael Copa's avatar
Natanael Copa committed
2 3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfsprogs
Leo's avatar
Leo committed
4
pkgver=5.8.0
Leo's avatar
Leo committed
5
pkgrel=0
Natanael Copa's avatar
Natanael Copa committed
6
pkgdesc="XFS filesystem utilities"
7
url="https://xfs.org/index.php/Main_Page"
8
arch="all"
Leo's avatar
Leo committed
9
license="LGPL-2.1-or-later"
10
makedepends="linux-headers attr-dev util-linux-dev bash gzip python3"
11
options="!check"  # no test suite
12
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-extra"
Leo's avatar
Leo committed
13
source="https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-$pkgver.tar.gz
14
	fix-mmap.patch
15
	musl-MAP_SYNC-fix.patch
Natanael Copa's avatar
Natanael Copa committed
16 17
	"

18
build() {
Natanael Copa's avatar
Natanael Copa committed
19 20
	export DEBUG=-DNDEBUG
	export OPTIMIZER="$CFLAGS"
21 22 23 24
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
Natanael Copa's avatar
Natanael Copa committed
25 26
		--sbindir=/sbin \
		--libexecdir=/usr/lib \
27 28
		--enable-gettext=no
	make SHELL=/bin/bash
29 30 31
}

package() {
32
	make -j1 DIST_ROOT="$pkgdir" install install-dev
33
	find "$pkgdir" -name *.la -delete
34 35 36 37 38
	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
39
	chown -R root:root "$pkgdir"/*
40 41 42
}

extra() {
43
	depends="$pkgname python3" # python3 for xfs_scrub_all
44
	pkgdesc="XFS filesystem extra utilities"
45
	mkdir -p "$subpkgdir"
46
	rm -rf "$pkgdir"/lib "$pkgdir"/usr/lib
47
	mv "$pkgdir"/usr "$subpkgdir"/
Natanael Copa's avatar
Natanael Copa committed
48
}
49

Leo's avatar
Leo committed
50
sha512sums="788ec28f2c46db2a2b76ecb386e983e60519deaf91c87a8d313e3c3d40074ce1584ebc5d9da651f01acab6d5721f1ed1eb017f2a40c977e47eb883465b7e5881  xfsprogs-5.8.0.tar.gz
51 52
080161b211e20277e44f714961b36064536bb5cce72a6f93fef4996e296a3953d33c1a066ef371ccd5551622357105f9be9086ef917386f5d43f6a211b0bd7c9  fix-mmap.patch
bc7971207a296d8112f8993f6a266533135aae59a4438bb511f472931c37b8ce3033c597d67abbd3664f4405317aeb049e747c1811c9495c1a24d98935f799cc  musl-MAP_SYNC-fix.patch"