summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2b263f6cb293c6057185be3a38790838030746b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#Maintainer : Frederic Bezies <fredbezies at gmail dot com>
#Contributor : baskerville <nihilhill at gmail dot com>

pkgname=youtube-dl-git
pkgver=2015.11.27.1.r0.g78a55d7
pkgrel=1

pkgdesc='A small command-line program to download videos from YouTube.com and a few more sites - git version'
url="http://rg3.github.io/youtube-dl"
arch=('any')
license=('custom')

depends=('python' 'python-setuptools')
makedepends=('git')

optdepends=('ffmpeg: for video post-processing')

provides=('youtube-dl')
conflicts=('youtube-dl')

source=('git://github.com/rg3/youtube-dl.git')

md5sums=('SKIP')

pkgver() {
	cd youtube-dl
	git describe --long | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
	cd youtube-dl
	sed -i 's|etc/bash_completion.d|share/bash-completion/completions|' setup.py
        sed -i ':etc/fish/completions:d' setup.py
}

package() {
	cd youtube-dl

	python devscripts/bash-completion.py
	python setup.py install --root="$pkgdir" --optimize=1

	mv "$pkgdir"/usr/share/bash-completion/completions/youtube-dl.bash-completion \
	   "$pkgdir"/usr/share/bash-completion/completions/youtube-dl
	install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}