aboutsummaryrefslogtreecommitdiffstats
path: root/main/xfsprogs/APKBUILD
blob: 4c44c9a48ed939b095d1c05b178ef769c9ea8880 (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
65
66
67
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfsprogs
pkgver=4.5.0
pkgrel=0
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="ftp://oss.sgi.com/projects/xfs/cmd_tars/$pkgname-$pkgver.tar.gz
	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
}

extra() {
	depends="$pkgname"
	pkgdesc="XFS filesystem extra utilities"
	mkdir -p "$subpkgdir"
	rmdir "$pkgdir"/lib "$pkgdir"/usr/lib || return 1
	mv "$pkgdir"/usr "$subpkgdir"/
}

md5sums="fcba94b6c74b726dac956d7a650c0c31  xfsprogs-4.5.0.tar.gz
10fe8108861988ec1a1026521c21ec75  musl-fixes.patch"
sha256sums="e49beb314984efbd0d758abb5c6137db3bb60a88e59e1e94c00defb536cf89f8  xfsprogs-4.5.0.tar.gz
2d5846e695f9c14bf886e45637985155b580e261fb992f209012f6cbaaf6415a  musl-fixes.patch"
sha512sums="19c95551dc91ec46916f9a7e3d7976907664d32dd5fdc26af0ca62ca74c4b3c10f9e843aac8214ea9d1c0bf140c9f4e321d059808af01a623abedd5067011314  xfsprogs-4.5.0.tar.gz
52d7ff52e19a5f351f3a97bb20c9f5a063b344ca2e18250a5ee3e15a1693461f95825aa8b7c3c9149d2ce3696c64772d092f679810eccf996321ea93b0770596  musl-fixes.patch"