summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a14f4d4c9ce535db98b01777300daf0915307ac9 (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
# Maintainer: lmartinez-mirror
pkgname=mpv-sponsorblock-git
_pkgname=${pkgname%-git}
pkgver=r52.aea7a77
pkgrel=2
pkgdesc="A script to skip sponsored segments of YouTube videos"
arch=('any')
url="https://github.com/po5/mpv_sponsorblock"
license=('GPL3')
groups=('mpv-plugins')
depends=('mpv' 'python3')
makedepends=('git')
provides=('mpv-sponsorblock')
install=mpv-sponsorblock.install
source=("$_pkgname::git+$url")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$_pkgname"
  install -Dm 755 sponsorblock.lua -t "$pkgdir/usr/lib/mpv/$pkgname/"
  find sponsorblock_shared -type f -exec install -Dm 755 '{}' \
    -t "$pkgdir/usr/lib/mpv/$pkgname/" \;
}