Mail archive
alpine-aports

[alpine-aports] [PATCH] main/file: libmagic library moved to separate subpackage. minor APKBUILD cleanups

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Wed, 20 Jan 2016 17:19:50 +0200

---
 main/file/APKBUILD | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/main/file/APKBUILD b/main/file/APKBUILD
index ceff2e6..6fdc2e5 100644
--- a/main/file/APKBUILD
+++ b/main/file/APKBUILD
_at_@ -1,32 +1,22 @@
+# Contributor: Valery Kartel <valery.kartel_at_gmail.com>
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=file
 pkgver=5.25
-pkgrel=0
+pkgrel=1
 pkgdesc="File type identification utility"
 url="http://www.darwinsys.com/file/"
 arch="all"
 license="BSD"
 depends=""
-source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz
-	"
-subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.astron.com/pub/file/file-$pkgver.tar.gz"
 
-_builddir="$srcdir/$pkgname-$pkgver"
-prepare() {
-	cd "$_builddir"
-	update_config_sub || return 1
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
-}
+subpackages="$pkgname-dev $pkgname-doc libmagic"
+
+_builddir="$srcdir"/$pkgname-$pkgver
 
 build() {
 	cd "$_builddir"
 	./configure \
-		--build=$CBUILD \
-		--host=$CHOST \
 		--prefix=/usr \
 		--datadir=/usr/share \
 		|| return 1
_at_@ -39,6 +29,12 @@ package() {
 	make DESTDIR="$pkgdir" install || return 1
 }
 
+libmagic() {
+	pkgdesc="File type identification library"
+	mkdir -p "$subpkgdir"/usr
+	mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr
+}
+
 md5sums="e6a972d4e10d9e76407a432f4a63cd4c  file-5.25.tar.gz"
 sha256sums="3735381563f69fb4239470b8c51b876a80425348b8285a7cded8b61d6b890eca  file-5.25.tar.gz"
 sha512sums="4a5176a7e80df2bb7e45916490433d22eb98a442d49d04146afcbdcf92ff619ea3e73e95c8991e6b6a0628efb9d127bfa4aafc1cae523f8261ca693bc5e13402  file-5.25.tar.gz"
-- 
2.7.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Jan 20 2016 - 17:19:50 GMT