~alpine/aports

[alpine-aports] [PATCH] main/youtube-dl: add subpackages

Details
Message ID
<1439565640-1549-1-git-send-email-soeren+git@soeren-tempel.net>
Sender timestamp
1439565640
DKIM signature
missing
Download raw message
Patch: +33 -9
The following subpackages where added:
- youtube-dl-bash-completion
- youtube-dl-fish-completion
- youtube-dl-doc
---
 main/youtube-dl/APKBUILD | 42 +++++++++++++++++++++++++++++++++---------
 1 file changed, 33 insertions(+), 9 deletions(-)

diff --git a/main/youtube-dl/APKBUILD b/main/youtube-dl/APKBUILD
index 52c9984..9db8273 100644
--- a/main/youtube-dl/APKBUILD
+++ b/main/youtube-dl/APKBUILD
@@ -1,19 +1,23 @@
# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=youtube-dl
pkgver=2015.07.28
pkgrel=0
pkgrel=1
pkgdesc="A small command-line program to download videos from YouTube."
url="http://rg3.github.io/youtube-dl/"
url="http://rg3.github.io/$pkgname/"
arch="noarch"
license="Public Domain"
depends="python>=2.5 py-setuptools ffmpeg"
subpackages=""
source="http://youtube-dl.org/downloads/$pkgver/$pkgname-$pkgver.tar.gz"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion:bashcomp
	$pkgname-fish-completion:fishcomp"
source="http://$pkgname.org/downloads/$pkgver/$pkgname-$pkgver.tar.gz"

_builddir="$srcdir"/youtube-dl
_builddir="$srcdir"/$pkgname
prepare() {
	cd "$_builddir"
	sed -i 's|etc/bash_completion.d|share/bash-completion/completions|' setup.py || return 1
@@ -22,10 +26,30 @@ prepare() {

package() {
	cd "$_builddir"
	  python setup.py install --root="$pkgdir/" --optimize=1 || return 1
	  mv "$pkgdir/usr/share/bash-completion/completions/youtube-dl.bash-completion" \
	"$pkgdir/usr/share/bash-completion/completions/youtube-dl"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
	python setup.py install --root="$pkgdir/" --optimize=1 || return 1
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
}

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

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

fishcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel fish"
	arch="noarch"

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

md5sums="fbab5aafb7274e965ed0df24ab9970dc  youtube-dl-2015.07.28.tar.gz"
-- 
2.5.0



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