APKBUILD 1.95 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 5
pkgver=4.5.0
pkgrel=0
Natanael Copa's avatar
Natanael Copa committed
6 7
pkgdesc="XFS filesystem utilities"
url="http://oss.sgi.com/projects/xfs/"
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="ftp://oss.sgi.com/projects/xfs/cmd_tars/$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
md5sums="fcba94b6c74b726dac956d7a650c0c31  xfsprogs-4.5.0.tar.gz
63
10fe8108861988ec1a1026521c21ec75  musl-fixes.patch"
64
sha256sums="e49beb314984efbd0d758abb5c6137db3bb60a88e59e1e94c00defb536cf89f8  xfsprogs-4.5.0.tar.gz
65
2d5846e695f9c14bf886e45637985155b580e261fb992f209012f6cbaaf6415a  musl-fixes.patch"
66
sha512sums="19c95551dc91ec46916f9a7e3d7976907664d32dd5fdc26af0ca62ca74c4b3c10f9e843aac8214ea9d1c0bf140c9f4e321d059808af01a623abedd5067011314  xfsprogs-4.5.0.tar.gz
67
52d7ff52e19a5f351f3a97bb20c9f5a063b344ca2e18250a5ee3e15a1693461f95825aa8b7c3c9149d2ce3696c64772d092f679810eccf996321ea93b0770596  musl-fixes.patch"