Add HaiPO app (#13251)

This commit is contained in:
tmtfx
2025-11-25 17:54:07 +01:00
committed by GitHub
parent 5d66511ad2
commit 344c8f2d62

View File

@@ -0,0 +1,66 @@
SUMMARY="A gettext Portable Object editor for translators"
DESCRIPTION="HaiPO is a gettext Portable Object editor. \
It's a python3 program, that uses Haiku APIs (through Haiku-PyAPI \
wrapper), that helps translators manage PO files. \
It integrates a spell checker and a translation memory system and \
multiple online translators, such as Google Translate, Microsoft \
ChatGPT, Yandex etc. (At the moment only Google Translator is supported). \
HaiPO code is released under the MIT license. This package is released \
along with a copy of: Translate toolkit (released under GPL2), \
rapidfuzz (MIT), \
Levenshtein (GPL), \
deep-translator (MIT) \
"
HOMEPAGE="https://github.com/tmtfx/HaiPO"
COPYRIGHT="2025 Fabio Tomat (TmTFx)"
LICENSE="
GNU GPL v3
MIT
"
REVISION="1"
SOURCE_URI="https://github.com/tmtfx/HaiPO/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="7d86fe032d8595631b382771f881ed33a53ebc9bb14f86f0585b08b5577df753"
SOURCE_DIR="HaiPO-$portVersion"
ARCHITECTURES="x86_64"
PROVIDES="
haipo = $portVersion
app:HaiPO = $portVersion
cmd:HaiPO.py
cmd:LaunchHaiPO
"
REQUIRES="
haiku
haiku_pyapi_python310
pyenchant_python310
hunspell
myspell
babel_python310
lxml_python310
sphinx_python310
beautifulsoup4_python310
gettext
"
INSTALL()
{
mkdir -p $appsDir/HaiPO2 $binDir $dataDir/HaiPO2 $docDir/HaiPO2 $dataDir/mime_db
cp HaiPO.py $appsDir/HaiPO2
cp -a translate $appsDir/HaiPO2/
cp -a deep_translator $appsDir/HaiPO2/
cp -a Levenshtein $appsDir/HaiPO2/
cp -a rapidfuzz $appsDir/HaiPO2/
cp -a polib $appsDir/HaiPO2/
cp -a data/locale $dataDir/HaiPO2/
cp data/HaiPO.png $dataDir/HaiPO2
cp data/plural_forms.txt $dataDir/HaiPO2
cp data/help/* $docDir/HaiPO2
unzip x-gettext-translation.zip
mv text $dataDir/mime_db
ln -sfn $appsDir/HaiPO2/HaiPO.py $binDir/HaiPO.py
ln -sfn $appsDir/HaiPO2/HaiPO.py $appsDir/HaiPO2/HaiPO
addAppDeskbarSymlink $appsDir/HaiPO2/HaiPO
unzip LaunchHaiPO.zip
mv LaunchHaiPO $binDir
}