3 3

[alpine-devel] [PATCH] main/git: bash-completion subpackage

Eivind Uggedal
Details
Message ID
<1385553044-19328-1-git-send-email-eivind@uggedal.com>
Sender timestamp
1385553044
DKIM signature
missing
Download raw message
Patch: +12 -2
---
 main/git/APKBUILD | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/main/git/APKBUILD b/main/git/APKBUILD
index c539da616861..cdad44cbdd9a 100644
--- a/main/git/APKBUILD
+++ b/main/git/APKBUILD
@@ -1,14 +1,14 @@
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=git
 pkgver=1.8.4.3
-pkgrel=0
+pkgrel=1
 pkgdesc="A distributed version control system"
 url="http://git.or.cz/"
 arch="all"
 license="GPL2+"
 depends=
 replaces="git-perl"
-subpackages="$pkgname-doc $pkgname-svn $pkgname-perl"
+subpackages="$pkgname-doc $pkgname-svn $pkgname-perl $pkgname-bash-completion:completion"
 makedepends="zlib-dev openssl-dev curl-dev expat-dev perl-dev python-dev
 	pcre-dev"
 source="http://git-core.googlecode.com/files/git-$pkgver.tar.gz
@@ -75,6 +75,16 @@ svn() {
         mv "$pkgdir"/usr/libexec/git-core/git-svn "$subpkgdir"/usr/libexec/git-core
 }
 
+completion() {
+	depends=""
+	pkgdesc="Bash completion script for git"
+	arch="noarch"
+	replaces=""
+
+	install -Dm644 "$srcdir"/git-$pkgver/contrib/completion/git-completion.bash \
+		"$subpkgdir"/usr/share/bash-completion/completions/git
+}
+
 md5sums="ec3f9007cc1542e8d94ccff1cf8882f5  git-1.8.4.3.tar.gz
 178d2d10f9740fac4a8af0155368b3d9  0001-config-add-_cb-suffix-to-callback-functions.patch
 e63a201556c4f089de790805c09a2e5b  bb-tar.patch
-- 
1.8.4.3



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Timo Teras
Details
Message ID
<20131127143028.51c1fd9f@vostro>
In-Reply-To
<1385553044-19328-1-git-send-email-eivind@uggedal.com> (view parent)
Sender timestamp
1385555428
DKIM signature
missing
Download raw message
On Wed, 27 Nov 2013 11:50:44 +0000
Eivind Uggedal <eivind@uggedal.com> wrote:

> @@ -75,6 +75,16 @@ svn() {
>          mv "$pkgdir"/usr/libexec/git-core/git-svn
> "$subpkgdir"/usr/libexec/git-core }
>  
> +completion() {
> +	depends=""
> +	pkgdesc="Bash completion script for git"
> +	arch="noarch"
> +	replaces=""
> +

Would it make sense to have here install_if="git bash" or
install_if="git bash-completion" or similar?

- Timo


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Eivind Uggedal
Details
Message ID
<CAM-O=1CbumX97tuU148DsM-UcBkByTfmn8gNRvnvh0n-ihzUQQ@mail.gmail.com>
In-Reply-To
<20131127143028.51c1fd9f@vostro> (view parent)
Sender timestamp
1385564107
DKIM signature
missing
Download raw message
On Wed, Nov 27, 2013 at 1:30 PM, Timo Teras <timo.teras@iki.fi> wrote:
>
> On Wed, 27 Nov 2013 11:50:44 +0000
> Eivind Uggedal <eivind@uggedal.com> wrote:
>
> > @@ -75,6 +75,16 @@ svn() {
> >          mv "$pkgdir"/usr/libexec/git-core/git-svn
> > "$subpkgdir"/usr/libexec/git-core }
> >
> > +completion() {
> > +     depends=""
> > +     pkgdesc="Bash completion script for git"
> > +     arch="noarch"
> > +     replaces=""
> > +
>
> Would it make sense to have here install_if="git bash" or
> install_if="git bash-completion" or similar?

I didn't know about `install_if`. Seems it's used sparsely in the
aports repo. But it would be nice to pull in the completion packages
if one have bash-completion installed.

By this logic, should default_doc add an install_if="man"?

Eivind


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20131127220253.5e0457d8@ncopa-netbook.res.nor.wtbts.net>
In-Reply-To
<1385553044-19328-1-git-send-email-eivind@uggedal.com> (view parent)
Sender timestamp
1385586173
DKIM signature
missing
Download raw message
On Wed, 27 Nov 2013 11:50:44 +0000
Eivind Uggedal <eivind@uggedal.com> wrote:

> ---
>  main/git/APKBUILD | 14 ++++++++++++--

applied as is.

thanks!


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---