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.3.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"
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

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

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

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

Leo's avatar
Leo committed
51
sha512sums="b33f203625a98d2e56c854b90b5933b00202435be69395da740e9642a6f8072b948c5bec94e759716ed2c31aa09c82e96714bb3d3f566ebcab66e035e24e7137  xfsprogs-5.3.0.tar.gz
52 53
080161b211e20277e44f714961b36064536bb5cce72a6f93fef4996e296a3953d33c1a066ef371ccd5551622357105f9be9086ef917386f5d43f6a211b0bd7c9  fix-mmap.patch
bc7971207a296d8112f8993f6a266533135aae59a4438bb511f472931c37b8ce3033c597d67abbd3664f4405317aeb049e747c1811c9495c1a24d98935f799cc  musl-MAP_SYNC-fix.patch"