summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 68a143dcd47c188d8b08c613c099dd3899009940 (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
# Maintainer: Abdullah Al Muaz <abdullahalmuaz15@gmail.com>
pkgname=botflix-git
pkgver=r152.346f31c
pkgrel=1
pkgdesc="🎥 Stream your favorite movie from the terminal!"
arch=('any')
url="https://github.com/kaboussi/Botflix"
license=('MIT')
groups=()
depends=('nodejs' 'npm' 'python' 'python-pip' 'python-simple-term-menu' 'scrapy' 'python-rich' 'webtorrent-cli')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=(${pkgname%-git}::git+https://github.com/kaboussi/Botflix.git)
md5sums=('SKIP')

pkgver() {
        cd "$srcdir/${pkgname%-git}"
# Git, tags available
        ( set -o pipefail
        git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
  )
}

package() {
        cd "$srcdir/${pkgname%-git}"
        mkdir -p "$pkgdir/usr/share/${pkgname%-git}"
        cp -r . "$pkgdir/usr/share/${pkgname%-git}"

        mkdir -p "$pkgdir/usr/bin"
        echo "#!/bin/bash" > "$pkgdir/usr/bin/${pkgname%-git}"
        echo "python /usr/share/${pkgname%-git}/main.py" >> "$pkgdir/usr/bin/${pkgname%-git}"
        chmod +x "$pkgdir/usr/bin/${pkgname%-git}"
}

sha512sums=('SKIP')