summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b463c7076067c5b8e5ee3d70108f84d06cdeadbb (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=r81.fa7dfea
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
}