summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3b396af59fc93ff4f5db41fab1fa3757d53c74e5 (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
# Maintainer: Eugene Dvoretsky <radioxoma at gmail com>

_name=langmix
pkgname=$_name-git
pkgver=0.2.1.r0.gbe671f7
pkgrel=1
pkgdesc="Extract and merge multilingual subtitles into one file"
arch=('any')
url="https://github.com/radioxoma/langmix"
license=('MIT')
depends=('python-pysrt')
makedepends=('git' 'python-build' 'python-installer')
optdepends=('ffmpeg: extract SRT subtitles')
provides=("$_name")
source=("$pkgname::git+https://github.com/radioxoma/langmix")
sha256sums=('SKIP')

pkgver() {
    cd $pkgname
    git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd $pkgname
    python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
    cd $pkgname
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm755 "extractors/langmix-extractsrt.sh" "$pkgdir/usr/bin/langmix-extractsrt"
    install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/$_name"
}