Mail archive
alpine-aports

[alpine-aports] [PATCH 1/4] main/mpv: enable zsh completions

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Tue, 18 Aug 2015 19:39:53 +0200

---
 main/mpv/APKBUILD | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/main/mpv/APKBUILD b/main/mpv/APKBUILD
index cf64ec7..7b52930 100644
--- a/main/mpv/APKBUILD
+++ b/main/mpv/APKBUILD
_at_@ -1,9 +1,10 @@
+# Contributor: Sören Tempel <soeren+alpine_at_soeren-tempel.net>
 # Contributor: Łukasz Jendrysik <scadu_at_yandex.com>
 # Contributor: Natanael Copa <ncopa_at_alpinelinux.org>
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=mpv
 pkgver=0.9.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Video player based on MPlayer/mplayer2"
 url="http://mpv.io/"
 arch="all"
_at_@ -15,7 +16,10 @@ makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
 	mesa-dev ffmpeg-dev libass-dev perl lua5.2-dev libvdpau-dev python
 	libxext-dev libxscrnsaver-dev py-docutils"
 install=""
-subpackages="$pkgname-doc $pkgname-libs"
+subpackages="
+	$pkgname-doc
+	$pkgname-libs
+	$pkgname-zsh-completion:zshcomp"
 source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/mpv/archive/v$pkgver.tar.gz
 	"
 
_at_@ -38,6 +42,7 @@ build() {
 		--confdir=/etc/mpv \
 		--enable-libmpv-shared \
 		--enable-libass \
+		--enable-zsh-comp \
 		--enable-xss \
 		|| return 1
 
_at_@ -61,6 +66,17 @@ package() {
 		"$pkgdir"/usr/share/doc/mpv/examples  || return 1
 }
 
+zshcomp() {
+	depends=""
+	pkgdesc="Zsh completions for $pkgname"
+	install_if="$pkgname=$pkgver-r$pkgrel zsh"
+	arch="noarch"
+
+	mkdir -p "$subpkgdir/usr/share/zsh/site-functions"
+	mv "$pkgdir/usr/share/zsh/site-functions"/* \
+		"$subpkgdir/usr/share/zsh/site-functions" || return 1
+}
+
 md5sums="ed1384e703f7032e531731842e4da4f7  mpv-0.9.2.tar.gz"
 sha256sums="c0148f55dbd17705f49bb496d0ce374419de62e1b17195d91409d7727cbd4751  mpv-0.9.2.tar.gz"
 sha512sums="4f652a8e78d65b0ef44a06287b05250dfdfbce4cf5a6e21d3b446eedec268d83cf98afcc687272e2da2cfac9e9f69a303847dffdfd45cecdd4273b943ce50967  mpv-0.9.2.tar.gz"
-- 
2.5.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Aug 18 2015 - 19:39:53 GMT