aboutsummaryrefslogtreecommitdiffstats
path: root/main/xfsprogs/APKBUILD
blob: f28da34153cf9b21ba461861a490d005285d83f9 (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
53
54
55
56
57
58
59
60
61
62
63
64
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfsprogs
pkgver=4.5.0
pkgrel=1
pkgdesc="XFS filesystem utilities"
url="http://oss.sgi.com/projects/xfs/"
arch="all"
license="LGPL"
depends=""
makedepends="linux-headers util-linux-dev bash gzip"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-extra"
source="https://www.kernel.org/pub/linux/utils/fs/xfs/$pkgname/$pkgname-$pkgver.tar.xz
	musl-fixes.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

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

package() {
	cd "$_builddir"
	make -j1 DIST_ROOT="$pkgdir" install install-dev || return 1
	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"
	pkgdesc"XFS filesystem extra utilities"
	mkdir -p "$subpkgdir"
	rmdir "$pkgdir"/lib "$pkgdir"/usr/lib || return 1
	mv "$pkgdir"/usr "$subpkgdir"/
}

sha512sums="4efb287f4757256da8c32c14ab6dd0d203204c658a17178324dae4befbce5146bbd29521f8306694a72b4bbe7a1b98062428e1ca80924e883cbd97cf458c5643  xfsprogs-4.5.0.tar.xz
52d7ff52e19a5f351f3a97bb20c9f5a063b344ca2e18250a5ee3e15a1693461f95825aa8b7c3c9149d2ce3696c64772d092f679810eccf996321ea93b0770596  musl-fixes.patch"