summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9dcf1f0633a017c5cb11fc6342a1fad464857a4d (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
# Maintainer: Ash <xash at riseup d0t net>
pkgname="mpv-reload-git"
pkgver=r16.1a6a938
pkgrel=3
pkgdesc="A userscript for MPV that provides automatic reloading of videos based on buffering progress and allows manual reload with Ctrl+r."
arch=('any')
url="https://github.com/4e6/mpv-reload"
license=('MIT')
depends=('mpv')
makedepends=('git')
provides=('mpv-reload')
conflicts=('mpv-reload')
source=("git+https://github.com/4e6/mpv-reload.git"
        "reload.conf"
)
md5sums=('SKIP'
         '9a83a0fcc88e778ef7531770f82d4e33'
)

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

package() {
  cd "${srcdir}/mpv-reload"
  
  # Install reload.lua script
  install -Dm 644 "reload.lua" "$pkgdir/etc/mpv/scripts/reload.lua"
  
  # Install the default config file (from the README.md)
  install -Dm 644 "$srcdir/reload.conf" "$pkgdir/etc/mpv/script-opts/reload.conf"

  # Install LICENSE
  install -Dm 644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
}