summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 732428b749617a50dc0ba3343211c2227d92ce21 (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
# Maintainer: Sieve Lau <sievelau@gmail.com>

pkgname=danmakufactory-git
pkgver=r68.d994828
pkgrel=1
pkgdesc='A tool for converting XML danmaku to ass subtitles.'
url="https://github.com/hihkm/DanmakuFactory"
arch=(x86_64)
provides=(danmakufactory)
conflicts=(danmakufactory)
license=(MIT)
source=(
  "${pkgname%-git}::git+https://github.com/hihkm/DanmakuFactory.git"
)
md5sums=('SKIP')

pkgver() {
  cd $srcdir/${pkgname%-git}
  (
    set -o pipefail
    git describe --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)"
  )
}

build() {
  cd "$srcdir/${pkgname%-git}"
  make
}

package() {
  cd "$srcdir/${pkgname%-git}"
  install -Dm755 DanmakuFactory $pkgdir/usr/bin/DanmakuFactory
}