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

From: Valery Kartel <[email-masked]>
Date: Fri, 11 Dec 2015 12:35:39 +0200

---
 main/e2fsprogs/APKBUILD | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/main/e2fsprogs/APKBUILD b/main/e2fsprogs/APKBUILD
index 87b2c3f..87c586e 100644
--- a/main/e2fsprogs/APKBUILD
+++ b/main/e2fsprogs/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=e2fsprogs
 pkgver=1.42.13
-pkgrel=1
+pkgrel=2
 pkgdesc="Standard Ext2/3/4 filesystem utilities"
 url="http://e2fsprogs.sourceforge.net"
 arch="all"
@@ -11,11 +11,11 @@ depends=
 install=
 depends_dev="util-linux-dev"
 makedepends="$depends_dev linux-headers"
-subpackages="$pkgname-dev $pkgname-doc libcom_err $pkgname-libs"
+subpackages="$pkgname-dev $pkgname-doc libcom_err $pkgname-libs $pkgname-extra"
 source="http://downloads.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-$pkgver.tar.gz"
 
-
 _builddir="$srcdir"/$pkgname-$pkgver
+
 prepare() {
 	local i
 	cd "$_builddir"
@@ -33,6 +33,7 @@ build () {
 		--host=$CHOST \
 		--mandir=/usr/share/man \
 		--enable-elf-shlibs \
+		--enable-symlink-install \
 		--disable-fsck \
 		--disable-uuidd \
 		--disable-libuuid \
@@ -46,7 +47,11 @@ build () {
 
 package() {
 	cd "$_builddir"
-	make -j1 LDCONFIG=: DESTDIR="${pkgdir}" install install-libs || return 1
+	make -j1 LDCONFIG=: DESTDIR="$pkgdir" install install-libs || return 1
+	mv "$pkgdir"/sbin/* "$pkgdir"/usr/sbin/
+	for i in e2fsck mke2fs mkfs.* fsck.*; do
+		mv "$pkgdir"/usr/sbin/$i "$pkgdir"/sbin/
+	done
 }
 
 dev() {
@@ -60,12 +65,19 @@ dev() {
 }
 
 libcom_err() {
-	depends=
-	replaces="e2fsprogs"
+	pkgdesc="Common error description library"
 	mkdir -p "$subpkgdir"/lib
 	mv "$pkgdir"/lib/libcom_err* "$subpkgdir"/lib/
 }
 
+extra() {
+	depends="$pkgname"
+	pkgdesc="Ext2/3/4 filesystem extra utilities"
+	mkdir -p "$subpkgdir"
+	rmdir "$pkgdir"/lib || return 1
+	mv "$pkgdir"/etc "$pkgdir"/usr "$subpkgdir"/
+}
+
 md5sums="bc759fc62666786f5436e2075beb3265  e2fsprogs-1.42.13.tar.gz"
 sha256sums="59993ff3a44f82e504561e0ebf95e8c8fa9f9f5746eb6a7182239605d2a4e2d4  e2fsprogs-1.42.13.tar.gz"
 sha512sums="d341790f55c3bff34425369063757280b9ba6ac08f405e14f94f299345ae76c0dc6e90871b746cc98c73467448d888fe5bc029688b5eed5fd22c3c37bf285cd0  e2fsprogs-1.42.13.tar.gz"
-- 
2.6.3

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---