Subject: [alpine-aports] [PATCH] main/less: move lesskey, lessecho to -utils subpackage

From: Valery Kartel <[email-masked]>
Date: Thu, 23 Mar 2017 14:30:06 +0200

- add !check
- set regex engine to pcre
---
 main/less/APKBUILD | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/main/less/APKBUILD b/main/less/APKBUILD
index 726690d058..a934fbb0e0 100644
--- a/main/less/APKBUILD
+++ b/main/less/APKBUILD
@@ -2,25 +2,21 @@
 # Maintainer: Cameron Banta <[email-masked]>
 pkgname=less
 pkgver=481
-pkgrel=2
+pkgrel=3
 pkgdesc="File pager"
 url="http://www.greenwoodsoftware.com/less/"
 arch="all"
 license="GPL"
+options="!check"
 depends=""
 makedepends="ncurses-dev"
 install=""
-subpackages="$pkgname-doc"
+subpackages="$pkgname-doc $pkgname-utils"
 source="http://www.greenwoodsoftware.com/$pkgname/$pkgname-$pkgver.tar.gz"
-
-
-prepare() {
-	cd "$srcdir/$pkgname-$pkgver"
-	chmod +x configure
-}
+builddir="$srcdir/$pkgname-$pkgver"
 
 build() {
-	cd "$srcdir/$pkgname-$pkgver"
+	cd "$builddir"
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
@@ -28,15 +24,20 @@ build() {
 		--sysconfdir=/etc \
 		--mandir=/usr/share/man \
 		--infodir=/usr/share/info \
+		--with-regex=pcre \
 		|| return 1
 	make || return 1
 }
 
 package() {
-	cd "$srcdir/$pkgname-$pkgver"
+	cd "$builddir"
 	make DESTDIR="$pkgdir" install
 }
 
-md5sums="50ef46065c65257141a7340123527767  less-481.tar.gz"
-sha256sums="3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5  less-481.tar.gz"
+utils() {
+	pkgdesc="$pkgdesc (utilities: lessecho, lesskey)"
+	mkdir -p "$subpkgdir"/usr/bin || return 1
+	mv "$pkgdir"/usr/bin/less?* "$subpkgdir"/usr/bin
+}
+
 sha512sums="29995757ac416ed6770cf6e82e6fe325bd1d61d51666d80c4fe72b2b4217b0b1d706d337d89ed54bdc4d83d57f3e2c0166e642b20ef2ad194e52aad630b3e717  less-481.tar.gz"
-- 
2.12.1

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