Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/libgflags: move bash completions to subpkg

From: David Huffman <storedbox_at_outlook.com>
Date: Fri, 22 Jan 2016 15:21:30 -0500

---
 testing/libgflags/APKBUILD | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/testing/libgflags/APKBUILD b/testing/libgflags/APKBUILD
index ca4c323..a1f4f73 100644
--- a/testing/libgflags/APKBUILD
+++ b/testing/libgflags/APKBUILD
_at_@ -12,7 +12,7 @@ depends=""
 depends_dev=""
 makedepends="$depends_dev cmake"
 install=""
-subpackages="$pkgname-dev $pkgname-doc"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-bash-completion:bashcomp"
 source="https://github.com/gflags/gflags/archive/v$pkgver/$_srcname.tar.gz"
 
 _builddir="$srcdir/$_srcname"
_at_@ -49,6 +49,16 @@ package() {
 	cp -r doc "$docdir/html"
 }
 
+bashcomp() {
+	depends=""
+	pkgdesc="Bash completion for $pkgname"
+	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+	arch="noarch"
+
+	install -Dm644 "$pkgdir/usr/bin/gflags_completions.sh" \
+	               "$subpkgdir/usr/share/bash-completion/completions/gflags"
+}
+
 md5sums="ac432de923f9de1e9780b5254884599f  gflags-2.1.2.tar.gz"
 sha256sums="d8331bd0f7367c8afd5fcb5f5e85e96868a00fd24b7276fa5fcee1e5575c2662  gflags-2.1.2.tar.gz"
 sha512sums="f636023c1150e4d536d2d472e40d643ff0b02d3c96d8cb7f31544df23e6255fa6c4fd927ef94a3660c250d3faeae7d8d78519fc5e856749a577347a78d9d9ab5  gflags-2.1.2.tar.gz"
-- 
2.7.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Jan 22 2016 - 15:21:30 GMT