Mail archive
alpine-aports

[alpine-aports] [PATCH] main/glib: add system pcre support, strip to subpackages

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Mon, 25 Jan 2016 14:41:13 +0200

- bash completion moved to subpackage
- libraries moved to subpackage
---
 main/glib/APKBUILD | 48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/main/glib/APKBUILD b/main/glib/APKBUILD
index 930e54f..4366112 100644
--- a/main/glib/APKBUILD
+++ b/main/glib/APKBUILD
_at_@ -1,7 +1,8 @@
+# Contributor: Valery Kartel <valery.kartel_at_gmail.com>
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=glib
 pkgver=2.46.2
-pkgrel=0
+pkgrel=1
 pkgdesc="Common C routines used by Gtk+ and other libs"
 url="http://www.gtk.org"
 arch="all"
_at_@ -9,15 +10,13 @@ license='GPL'
 depends=
 triggers="$pkgname.trigger=/usr/share/glib-2.0/schemas:/usr/lib/gio/modules"
 depends_dev="perl python gettext-dev zlib-dev bzip2-dev libffi-dev"
-makedepends="$depends_dev"
-source="http://ftp.gnome.org/pub/gnome/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz
+makedepends="$depends_dev pcre-dev"
+source="http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
 	0001-Revert-Move-quark-initialization-to-a-constructor.patch
 	"
-subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang"
-
-
-_builddir="$srcdir/$pkgname-$pkgver"
+subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-libs $pkgname-lang $pkgname-bash-completion:bashcomp"
 
+_builddir="$srcdir"/$pkgname-$pkgver
 prepare() {
 	cd "$_builddir"
 	for i in $source; do
_at_@ -40,13 +39,15 @@ build() {
 		--mandir=/usr/share/man \
 		--disable-gtk-doc \
 		--disable-compile-warnings \
+		--with-pcre=system \
+		--with-pic \
 		|| return 1
 	make || return 1
 }
 
 package() {
 	cd "$_builddir"
-	make DESTDIR="$pkgdir/" install
+	make DESTDIR="$pkgdir" install || return 1
 	rm -rf "$pkgdir"/usr/lib/charset.alias
 }
 
_at_@ -54,27 +55,26 @@ package() {
 dev() {
 	default_dev
 	replaces="glib"
-	mkdir -p "$subpkgdir"/usr/bin/ \
-		"$subpkgdir"/usr/share/bash-completion/completions \
-		|| return 1
+	mkdir -p "$subpkgdir"/usr/bin/ "$subpkgdir"/usr/share
 	cd "$pkgdir"/usr/bin
 	mv \
-		gdbus-codegen \
-		glib-compile-resources \
-		glib-genmarshal \
-		glib-gettextize \
-		glib-mkenums \
-		gobject-query \
-		gresource \
-		gtester \
-		gtester-report \
+		"$pkgdir"/usr/bin/gdbus-codegen \
+		"$pkgdir"/usr/bin/gobject-query \
+		"$pkgdir"/usr/bin/gtester* \
+		"$pkgdir"/usr/bin/glib-* \
 		"$subpkgdir"/usr/bin/
 	mv "$pkgdir"/usr/share/gdb \
 		"$pkgdir"/usr/share/glib-2.0 \
-		"$subpkgdir"/usr/share/ || return 1
-	mv "$pkgdir"/usr/share/bash-completion/completions/gresource \
-		"$subpkgdir"/usr/share/bash-completion/completions \
-		|| return 1
+		"$subpkgdir"/usr/share
+}
+
+bashcomp() {
+	pkgdesc="Bash completion for $pkgname"
+	arch="noarch"
+	depends=""
+	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+	mkdir -p "$subpkgdir"/usr/share
+	mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share
 }
 
 md5sums="7f815d6e46df68e070cb421ed7f1139e  glib-2.46.2.tar.xz
-- 
2.7.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Jan 25 2016 - 14:41:13 GMT