summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 905d7001199eb487b4c56c4d576f02a8d6f40a87 (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
37
# Maintainer: AtticFinder65536 <atticfinder -AT- rocklabs -DOT- xyz>

pkgname=('manga-ocr-git')
_gitname=('manga-ocr')
pkgver=0.1.8.r0.g250b89f
pkgrel=1
pkgdesc="Optical character recognition for Japanese text, trained to handle Japanese manga well"
url="https://github.com/kha-white/manga-ocr"
license=('Apache')
source=('git+https://github.com/kha-white/manga-ocr.git')
b2sums=('SKIP')
arch=('any')
depends=('python' 'python-fire' 'python-fugashi' 'python-jaconv' 'python-loguru' 'python-numpy' 'python-pillow' 'python-pyperclip' 'python-pytorch>=1.0' 'python-transformers>=4.12.5' 'python-unidic-lite')
makedepends=('git' 'python-setuptools')
checkdepends=('python-pytest')
provides=('manga-ocr')
conflicts=('manga-ocr')

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

build(){
        cd "${_gitname}"
        python setup.py build
}

check(){
        cd "${_gitname}"
        pytest
}

package(){
        cd "${_gitname}"
        python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}