aboutsummaryrefslogblamecommitdiffstats
path: root/community/youtube-dl/APKBUILD
blob: fde0d81f8aae537c604684f176671943af80b02b (plain) (tree)
1
2
3
4
5
6
7
8
9
                                               
                                                              
                                                   


                                              
                 
        
                                                                       
                            
             
                   
                                          

                    
                                       


                                                                      
                           
 
           
                      

                                                                                                


           
                      



                                                                                        
           
                                              
                     

                                                  
 
                                                 


                                                                               
            
                                               
                     

                                                              






                                                                                       
                                               
                     

                                                   



                                                                    

 


                                                                                                                                                                           
# 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=2016.10.12
pkgrel=0
pkgdesc="A small command-line program to download videos from YouTube."
url="http://youtube-dl.org "
arch="noarch"
license="Unlicense"
depends="python>=2.5 py-setuptools ffmpeg"
subpackages="
	$pkgname-doc
	$pkgname-zsh-completion:zshcomp
	$pkgname-bash-completion:bashcomp
	$pkgname-fish-completion:fishcomp"
source="http://$pkgname.org/downloads/$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname"

prepare() {
	cd "$builddir"
	sed -i 's|etc/bash_completion.d|share/bash-completion/completions|' setup.py || return 1
	sed -i 's|etc/fish/completions|share/fish/completions|' setup.py || return 1
}

package() {
	cd "$builddir"
	python setup.py install --root="$pkgdir/" --optimize=1 || return 1
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" || return 1
}

zshcomp() {
	pkgdesc="Zsh completions for $pkgname"
	arch="noarch"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	install -Dm644 "$builddir"/$pkgname.zsh \
		"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname || return 1
}

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

	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() {
	pkgdesc="Fish completions for $pkgname"
	arch="noarch"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel fish"

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

md5sums="861884fb22aa0c4d029040c897a3ec25  youtube-dl-2016.10.12.tar.gz"
sha256sums="3e96d144c5abe8016bc771eebbc687947c3332b3f06247d3cfcca1231041bde9  youtube-dl-2016.10.12.tar.gz"
sha512sums="bd671aa58784ebe057177b23131664d73ee6cd6a9993359c9689569afb6d0499d598ce95569c70028721d9b8d326698e2934e56bcbb503e1f22919510b3cff68  youtube-dl-2016.10.12.tar.gz"