summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5eb50dcbf7083817a2ae8f907a7d2b7e9b318b76 (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
# Maintainer: Hypnotron <the DOT hypnotron AT gmail DOT com>

_pkgname=sup2srt
pkgname="${_pkgname}-git"
pkgver=r128.b40c5aa
pkgrel=1
pkgdesc="Convert SUP graphic subtitles to text-based SRT format"
arch=('any')
url="https://github.com/retrontology/sup2srt"
license=('GPL-3.0-or-later')
depends=('libtiff' 'leptonica' 'tesseract' 'ffmpeg')
makedepends=('cmake' 'git')
source=("git+https://github.com/retrontology/sup2srt")
sha512sums=('SKIP')

build() {
    cd "${srcdir}/${_pkgname}"
    cmake -S . -B build \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr
    make -C build
}

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

package() {
    cd "${srcdir}/${_pkgname}"
    make -C build DESTDIR="${pkgdir}" install
}