makedeb


mov-cli-git 4.1.4.r25.a727fca-1


Python script for watching movies and TV shows via the terminal.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for mov-cli-git.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: Anakojm <https://anakojm.net/a-propos/#contact>
_pkgname='mov-cli'
pkgname='mov-cli-git'
pkgver=4.1.4.r25.a727fca
pkgrel=1
pkgdesc="Python script for watching movies and TV shows via the terminal."
arch=('all')
url="https://github.com/mov-cli/mov-cli"
license=('GPL3')
makedepends=('git' 'python3-build' 'python3-setuptools' 'python3-setuptools-scm' 'python3-installer' 'python3-wheel') 
depends=('python3-httpx' 'python3-toml' 'python3-devgoldyutils' 'python3-typer' 'python3-inquirer' 'python3-bs4' 'python3-unidecode' 'python3-deprecation' 'python3-thefuzz' 'mpv')
optdepends=("fzf"
            "python3-lxml: faster scraping" 
            "python3-cssselect: debian bug, required for python3-lxml"
            "vlc: alternate media player"
            "python3-mov-cli-anime: mov-cli v4 plugin for anime"
            "python3-mov-cli-films: mov-cli v4 plugin for films and shows"
            "python3-mov-cli-youtube: mov-cli v4 plugin for youtube"
            "python3-mov-cli-test: mov-cli v4 plugin for free films and animations in the CC")
provides=('mov-cli')
conflicts=('mov-cli')
source=('git+https://github.com/mov-cli/mov-cli.git')
b2sums=('SKIP')

prepare() {
  echo "Disclaimer: This project is to be used at the user's own risk, based on their government and laws."
}

pkgver() {
  cd "$srcdir/${_pkgname}"
  printf "%s.r%s.%s" "$(grep __version__ mov_cli/__init__.py | cut -d '"' -f 2)" "$(git rev-list --count HEAD)" "$(git describe --long --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g')"
}

build(){
  cd "$srcdir/$_pkgname"
  python3 -m build --no-isolation --wheel
}

package() {
  cd "$srcdir/$_pkgname"
  python3 -m installer --destdir="$pkgdir" dist/*.whl #--optimize=1 --skip-build
  # Manual remove local
  mv "$pkgdir/usr/local/"* "$pkgdir/usr/"
  rmdir "$pkgdir/usr/local" 
  # doc
  install -Dm644 "README.md" "$pkgdir/usr/share/doc/$_pkgname/readme"
  install -Dm644 "disclaimer.md" "$pkgdir/usr/share/doc/$_pkgname/disclaimer"
  ln -s /usr/share/common-licenses/GPL-3 "$pkgdir/usr/share/doc/$_pkgname/"
}