APKBUILD 1.67 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
4
pkgver=4.5.0
5
pkgrel=1
Natanael Copa's avatar
Natanael Copa committed
6
pkgdesc="XFS filesystem utilities"
7
url="http://xfs.org/index.php/Main_Page"
8
arch="all"
Natanael Copa's avatar
Natanael Copa committed
9
license="LGPL"
10
depends=""
11 12
makedepends="linux-headers util-linux-dev bash gzip"
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
	musl-fixes.patch
Natanael Copa's avatar
Natanael Copa committed
15 16
	"

17 18 19 20
_builddir="$srcdir"/$pkgname-$pkgver

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

28 29
build() {
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
30 31
	export DEBUG=-DNDEBUG
	export OPTIMIZER="$CFLAGS"
32 33 34 35
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
Natanael Copa's avatar
Natanael Copa committed
36 37
		--sbindir=/sbin \
		--libexecdir=/usr/lib \
38 39
		--enable-gettext=no \
		|| return 1
40
	make SHELL=/bin/bash || return 1
41 42 43 44
}

package() {
	cd "$_builddir"
45 46
	make -j1 DIST_ROOT="$pkgdir" install install-dev || return 1
	find "$pkgdir" -name *.la -delete
47 48 49 50 51 52 53 54 55
	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
}

extra() {
	depends="$pkgname"
56
	pkgdesc="XFS filesystem extra utilities"
57 58 59
	mkdir -p "$subpkgdir"
	rmdir "$pkgdir"/lib "$pkgdir"/usr/lib || return 1
	mv "$pkgdir"/usr "$subpkgdir"/
Natanael Copa's avatar
Natanael Copa committed
60
}
61

62
sha512sums="71ccb13fbbe09410b6ea116bbce9e6beb189246b29a7542e5f268649229aa0c156f197338573c17fc58e943a98b658fc38ceb21712d3c99af27f86a21eca7dca  xfsprogs-4.5.0.tar.gz
63
52d7ff52e19a5f351f3a97bb20c9f5a063b344ca2e18250a5ee3e15a1693461f95825aa8b7c3c9149d2ce3696c64772d092f679810eccf996321ea93b0770596  musl-fixes.patch"