Mail archive
alpine-aports

[alpine-aports] [PATCH] main/xfsprogs: All binaries and scripts not involved in the boot process and the creation of the filesystem are moved to -extra subpackage

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Fri, 11 Dec 2015 12:39:01 +0200

TODO:
- replace /sbin/fsck.xfs dummy script with real '/sbin/xfs_repair'-based one.
---
 main/xfsprogs/APKBUILD | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/main/xfsprogs/APKBUILD b/main/xfsprogs/APKBUILD
index 5aea23a..0c71420 100644
--- a/main/xfsprogs/APKBUILD
+++ b/main/xfsprogs/APKBUILD
_at_@ -2,14 +2,14 @@
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=xfsprogs
 pkgver=4.3.0
-pkgrel=0
+pkgrel=1
 pkgdesc="XFS filesystem utilities"
 url="http://oss.sgi.com/projects/xfs/"
 arch="all"
 license="LGPL"
 depends=""
-makedepends="linux-headers e2fsprogs-dev bash gzip"
-subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+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
 	"
_at_@ -29,18 +29,14 @@ build() {
 	cd "$_builddir"
 	export DEBUG=-DNDEBUG
 	export OPTIMIZER="$CFLAGS"
-	export INSTALL_USER=root
-	export INSTALL_GROUP=root
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
 		--prefix=/usr \
 		--sbindir=/sbin \
 		--libexecdir=/usr/lib \
-		--enable-lib64=no \
 		--enable-gettext=no \
 		|| return 1
-
 	make SHELL=/bin/bash || return 1
 }
 
_at_@ -48,6 +44,19 @@ 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="ade22791338fa3d2cf442d6bb84f1748  xfsprogs-4.3.0.tar.gz
-- 
2.6.3
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Dec 11 2015 - 12:39:01 GMT