summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 68b00b816bac2b0ad287dbe9d749fba8d20eaf44 (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
# Maintainer: mlunax <lunax at mlunax dot com>
# Maintainer: oscareczek <oscareczek at gmail dot com>

pkgname=haruhi-dl
pkgver=2021.08.01
_name="$pkgname-v$pkgver"
pkgrel=1
pkgdesc="Fork of youtube-dl, focused on bringing a fast, steady stream of updates. We'll do our best to merge patches to any site, not only youtube."
arch=('any')
url="https://haruhi.download"
license=('LGPL3')
depends=('python' 'python-setuptools')
makedepends=('git')
optdepends=('ffmpeg: for video post-processing'
            'rtmpdump: for rtmp streams support'
            'atomicparsley: for embedding thumbnails into m4a files')
provides=("haruhi-dl")
source=("$pkgname.tar.gz::https://git.sakamoto.pl/laudompat/$pkgname/-/archive/v$pkgver/$_name.tar.gz")
md5sums=('SKIP')

# pkgver() {
#   cd "$srcdir/$_name"
#   python -m haruhi_dl --version
# }

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

build() {
  cd "$srcdir/$_name"
  make zsh-completion
}

package() {
  cd "$srcdir/$_name"
  python devscripts/prerelease_codegen.py
  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 $pkgname.plugin.zsh "$pkgdir/usr/share/zsh/site-functions/_$pkgname"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}