Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] main/mpc: add bash completion subpackage

From: Timo Teras <timo.teras_at_iki.fi>
Date: Sat, 23 Jan 2016 23:17:39 +0200

On Sat, 23 Jan 2016 14:56:52 +0100
Sören Tempel <soeren+git_at_soeren-tempel.net> wrote:

> ---
> main/mpc/APKBUILD | 34 +++++++++++++++++++++++++++-------
> 1 file changed, 27 insertions(+), 7 deletions(-)
>
> diff --git a/main/mpc/APKBUILD b/main/mpc/APKBUILD
> index 13de645..e322726 100644
> --- a/main/mpc/APKBUILD
> +++ b/main/mpc/APKBUILD
>
> package() {
> - cd "$srcdir"/mpc-$pkgver
> + cd "$_builddir"
> make DESTDIR="$pkgdir" install || return 1
> +
> + # Remove the bash completion file from the -doc subpackage.
> + rm -f
> "$pkgdir"/usr/share/doc/$pkgname/$pkgname-completion.bash }
> +
> +bashcomp() {
> + depends=""
> + pkgdesc="Bash completions for $pkgname"
> + install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
> + arch="noarch"
> +
> + install -Dm644 "$_builddir"/doc/$pkgname-completion.bash \
> + "$subpkgdir"/usr/share/bash-completion/completions/$pkgname
> || return 1 +}
> +

Normally this is done so that the split function moves from $pkgdir
to $subpkg dir. Instead of package() removing, and split function
re-installing it.

Otherwise looks good.


---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sat Jan 23 2016 - 23:17:39 GMT