APKBUILD 1.73 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.1.0
Leo's avatar
Leo committed
5
pkgrel=0
Natanael Copa's avatar
Natanael Copa committed
6
pkgdesc="XFS filesystem utilities"
7
url="http://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"
13
source="https://www.kernel.org/pub/linux/utils/fs/xfs/$pkgname/$pkgname-$pkgver.tar.gz
14
	fix-mmap.patch
15
	musl-MAP_SYNC-fix.patch
Natanael Copa's avatar
Natanael Copa committed
16 17
	"

18

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

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

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

Leo's avatar
Leo committed
53
sha512sums="193259a6b48540add039355839082e37c7bef289974ce1864f7fb9bf43408856f335bc175a299e84bd5dfb92ce6326c8570b8b37b06ffce5a67377192ea49a48  xfsprogs-5.1.0.tar.gz
54 55
080161b211e20277e44f714961b36064536bb5cce72a6f93fef4996e296a3953d33c1a066ef371ccd5551622357105f9be9086ef917386f5d43f6a211b0bd7c9  fix-mmap.patch
bc7971207a296d8112f8993f6a266533135aae59a4438bb511f472931c37b8ce3033c597d67abbd3664f4405317aeb049e747c1811c9495c1a24d98935f799cc  musl-MAP_SYNC-fix.patch"