~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

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

Details
Message ID
<1453557412-7367-1-git-send-email-soeren+git@soeren-tempel.net>
Sender timestamp
1453557412
DKIM signature
missing
Download raw message
Patch: +27 -7
---
 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
@@ -1,30 +1,50 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpc
pkgver=0.27
pkgrel=0
pkgrel=1
pkgdesc="Minimalist command line interface to MPD"
url="http://mpd.wikia.com/wiki/Client:Mpc"
url="http://www.musicpd.org/clients/mpc/"
arch="all"
license="GPL2"
subpackages="$pkgname-doc"
depends=
depends=""
depends_dev=""
makedepends="libmpdclient-dev"
source="http://www.musicpd.org/download/mpc/${pkgver%.*}/mpc-${pkgver}.tar.xz"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp"
source="http://www.musicpd.org/download/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"

_builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$srcdir"/mpc-$pkgver
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

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
}

md5sums="d9430db9b9d7fb1eadbe4d13e8d97c66  mpc-0.27.tar.xz"
sha256sums="45a2be0a6dea65ed43f631294c24e74b83c8ee66d1ba6ab47d0744ddb1e62064  mpc-0.27.tar.xz"
sha512sums="f73550004697c6d4ae44f25c82a9e4477fa878accb8725f58b74b2785c02b175a35e675c5484c58766e9032fe19beabd35a64c57cd1afd81478619d2f51916d4  mpc-0.27.tar.xz"
-- 
2.7.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Timo Teras <timo.teras@iki.fi>
Details
Message ID
<20160123231739.6cfb577a@vostro>
In-Reply-To
<1453557412-7367-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1453583859
DKIM signature
missing
Download raw message
On Sat, 23 Jan 2016 14:56:52 +0100
Sören Tempel <soeren+git@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@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

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

Details
Message ID
<1453590139-16323-1-git-send-email-soeren+git@soeren-tempel.net>
In-Reply-To
<1453557412-7367-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1453590139
DKIM signature
missing
Download raw message
Patch: +25 -7
---
 main/mpc/APKBUILD | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/main/mpc/APKBUILD b/main/mpc/APKBUILD
index 13de645..d169be2 100644
--- a/main/mpc/APKBUILD
+++ b/main/mpc/APKBUILD
@@ -1,30 +1,48 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpc
pkgver=0.27
pkgrel=0
pkgrel=1
pkgdesc="Minimalist command line interface to MPD"
url="http://mpd.wikia.com/wiki/Client:Mpc"
url="http://www.musicpd.org/clients/mpc/"
arch="all"
license="GPL2"
subpackages="$pkgname-doc"
depends=
depends=""
depends_dev=""
makedepends="libmpdclient-dev"
source="http://www.musicpd.org/download/mpc/${pkgver%.*}/mpc-${pkgver}.tar.xz"
subpackages="$pkgname-bash-completion:bashcomp $pkgname-doc"
source="http://www.musicpd.org/download/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"

_builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$srcdir"/mpc-$pkgver
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir"/mpc-$pkgver
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
	arch="noarch"

	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
	mv "$pkgdir"/usr/share/doc/$pkgname/$pkgname-completion.bash \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname || return 1
}

md5sums="d9430db9b9d7fb1eadbe4d13e8d97c66  mpc-0.27.tar.xz"
sha256sums="45a2be0a6dea65ed43f631294c24e74b83c8ee66d1ba6ab47d0744ddb1e62064  mpc-0.27.tar.xz"
sha512sums="f73550004697c6d4ae44f25c82a9e4477fa878accb8725f58b74b2785c02b175a35e675c5484c58766e9032fe19beabd35a64c57cd1afd81478619d2f51916d4  mpc-0.27.tar.xz"
-- 
2.7.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)