Subject: [alpine-aports] [PATCH] main/gzip: upgrade to 1.7, script wrappers (zcat, gzexe, zgrep ... etc) moved to 'wrappers' subpackage

From: Valery Kartel <[email-masked]>
Date: Tue, 29 Mar 2016 09:32:11 +0300

---
 main/gzip/APKBUILD | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/main/gzip/APKBUILD b/main/gzip/APKBUILD
index 4b8f4bb..61b0e63 100644
--- a/main/gzip/APKBUILD
+++ b/main/gzip/APKBUILD
@@ -1,17 +1,18 @@
+# Contributor: Valery Kartel <[email-masked]>
 # Contributor: Leonardo Arena <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=gzip
-pkgver=1.6
-pkgrel=1
+pkgver=1.7
+pkgrel=0
 pkgdesc="A popular data compression program"
-subpackages="$pkgname-doc"
+subpackages="$pkgname-doc $pkgname-wrappers"
 url="http://www.gnu.org/software/gzip/"
 arch="all"
 license="GPL2"
 depends=
 makedepends=
 install=
-source="http://ftp.gnu.org/gnu/gzip/gzip-$pkgver.tar.gz"
+source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
 
 _builddir="$srcdir"/$pkgname-$pkgver
 build() {
@@ -33,17 +34,19 @@ package() {
 	cd "$_builddir"
 	make DESTDIR=$pkgdir install
 
-	rm -rf "$pkgdir"/usr/lib/charset.alias
-	rmdir -p "$pkgdir"/usr/lib 2>/dev/null
-
-	mkdir -p "$pkgdir"/bin
-	mv "$pkgdir"/usr/bin/gzip "$pkgdir"/usr/bin/gunzip "$pkgdir"/bin/
-	ln -s /bin/gzip "$pkgdir"/usr/bin/gzip
-	ln -s /bin/gunzip "$pkgdir"/usr/bin/gunzip
+	rm -rf "$pkgdir"/usr/lib
+}
 
-	# http://bugs.alpinelinux.org/issues/4011
-	ln -sf /bin/gunzip "$pkgdir"/usr/bin/uncompress
+wrappers() {
+	pkgdesc="$pkgdesc (wrapper scripts)"
+	depends="$pkgname"
+	arch="noarch"
+	mkdir -p "$subpkgdir"/usr/bin
+	for i in zcat zdiff zfgrep zgrep zmore gzexe zcmp zegrep zforce zless znew uncompress; do
+		mv "$pkgdir"/usr/bin/$i "$subpkgdir"/usr/bin
+	done
 }
-md5sums="38603cb2843bf5681ff41aab3bcd6a20  gzip-1.6.tar.gz"
-sha256sums="97eb83b763d9e5ad35f351fe5517e6b71521d7aac7acf3e3cacdb6b1496d8f7e  gzip-1.6.tar.gz"
-sha512sums="7fe04ddc101f8a6a8c91ca9cc3502ba80e08011ba27005ddde6bc5926b44066c2f943108c78ac66596cb5ea61f1f7e845a90899a11623638c15088d76e95f04a  gzip-1.6.tar.gz"
+
+md5sums="c4abae2ddd5c6f39c6f8169693cc7ac0  gzip-1.7.tar.gz"
+sha256sums="eccbaa178c7801618c887956f1668d45bb57863a9d2678bfc3e36d01fb951904  gzip-1.7.tar.gz"
+sha512sums="906b04ed976661aa55617b11c99d431c531495552f97827a5974071309bfd5007316ee502c4f518e1ef64926757afdb9acc593e5c679ffbb6972648b808507d1  gzip-1.7.tar.gz"
-- 
2.7.4

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

---

From: Natanael Copa <[email-masked]>
Date: Tue, 29 Mar 2016 10:21:30 +0200

On Tue, 29 Mar 2016 09:32:11 +0300

> index 4b8f4bb..61b0e63 100644

Why move the wrapper scripts to subpackage?

-nc

---

---

From: Valery Kartel <[email-masked]>
Date: Tue, 29 Mar 2016 13:19:27 +0300

It's for stay main package clean. As a variant is to move the only rarely
used wrappers like gzexe,zforce,znew ...

---

From: Natanael Copa <[email-masked]>
Date: Tue, 29 Mar 2016 13:10:34 +0200

On Tue, 29 Mar 2016 13:19:27 +0300

> used wrappers like gzexe,zforce,znew ...

I'm not sure its worth it. Those scripts are small already. Also, if
you really care about small, then you'd use busybox gzip anyway.

I'd say we keep the wrappers in main package to keep things simple.

-nc

---

---

From: Valery Kartel <[email-masked]>
Date: Tue, 29 Mar 2016 14:33:00 +0300

Yes you are right. I'll remade APKBUILD without -wrappers