Subject: [alpine-aports] [PATCH] main/mpv: add mpv-doc subpackage

From: Sören Tempel <[email-masked]>
Date: Thu, 13 Aug 2015 18:31:01 +0200

---
 main/mpv/APKBUILD | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/main/mpv/APKBUILD b/main/mpv/APKBUILD
index 6df585a..cf64ec7 100644
--- a/main/mpv/APKBUILD
+++ b/main/mpv/APKBUILD
@@ -3,7 +3,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=mpv
 pkgver=0.9.2
-pkgrel=0
+pkgrel=1
 pkgdesc="Video player based on MPlayer/mplayer2"
 url="http://mpv.io/"
 arch="all"
@@ -13,9 +13,9 @@ makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
 	libtheora-dev xvidcore-dev zlib-dev sdl-dev freetype-dev
 	x264-dev faac-dev ttf-dejavu libxvmc-dev alsa-lib-dev libva-dev
 	mesa-dev ffmpeg-dev libass-dev perl lua5.2-dev libvdpau-dev python
-	libxext-dev libxscrnsaver-dev"
+	libxext-dev libxscrnsaver-dev py-docutils"
 install=""
-subpackages="$pkgname-libs"
+subpackages="$pkgname-doc $pkgname-libs"
 source="$pkgname-$pkgver.tar.gz::https://github.com/mpv-player/mpv/archive/v$pkgver.tar.gz
 	"
 
@@ -47,6 +47,18 @@ build() {
 package() {
 	cd "$_builddir"
 	./waf install --destdir="$pkgdir" || return 1
+
+	local file=
+	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
+	for file in "$_builddir"/DOCS/*.rst "$_builddir"/DOCS/*.md; do
+		install -Dm644 "$file" \
+			"$pkgdir"/usr/share/doc/$pkgname || return 1
+	done
+
+	# Install example configuration files
+	mkdir -p "$pkgdir"/usr/share/doc/mpv/examples
+	install -Dm644 "$_builddir"/etc/*.conf \
+		"$pkgdir"/usr/share/doc/mpv/examples  || return 1
 }
 
 md5sums="ed1384e703f7032e531731842e4da4f7  mpv-0.9.2.tar.gz"
-- 
2.5.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---