summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAtticFinder655362023-01-23 17:32:26 +1100
committerAtticFinder655362023-01-23 17:32:26 +1100
commit24c863e8972b4fae20a82be72823d4119f36f246 (patch)
tree2c39e53ada992cc7bcd1476b0dec3945c96f5eb6 /PKGBUILD
downloadaur-manga-ocr-git.tar.gz
Import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..905d7001199e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,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
+}