diff options
author | vantu5z | 2022-07-25 09:27:01 +0300 |
---|---|---|
committer | vantu5z | 2022-07-25 09:27:01 +0300 |
commit | 6828f0f6426007c8685a92c2564caef04b8fe1b3 (patch) | |
tree | b4c87a76663e95dc065f58937d26324b17af63f8 | |
download | aur-6828f0f6426007c8685a92c2564caef04b8fe1b3.tar.gz |
init commit
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 37 |
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ea2f861e9117 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = python-libretranslate-git + pkgdesc = Python bindings for LibreTranslate + pkgver = r28.20220701 + pkgrel = 1 + url = https://github.com/argosopentech/LibreTranslate-py + arch = any + license = MIT + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel + depends = python + provides = python-libretranslate + conflicts = python-libretranslate + source = python-libretranslate-git::git+https://github.com/argosopentech/LibreTranslate-py.git + sha256sums = SKIP + +pkgname = python-libretranslate-git + provides = python-libretranslate + conflicts = python-libretranslate diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e52303898a1a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: vantu5z <vantu5z@mail.ru> + +pkgname=python-libretranslate-git +pkgver=r28.20220701 +pkgrel=1 +pkgdesc="Python bindings for LibreTranslate" +url="https://github.com/argosopentech/LibreTranslate-py" +depends=('python') +makedepends=('python-build' 'python-installer' 'python-wheel') +license=('MIT') +arch=('any') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=(${pkgname}::"git+https://github.com/argosopentech/LibreTranslate-py.git") +sha256sums=('SKIP') + +pkgver() { + cd $pkgname + # get number of last git commit + _commitCount=$(git rev-list --count HEAD) + # get time of last git commit + _commitTime=$(git show -s --format="%ci" | grep -o "....-..-.." | sed "s/-//g") + # add "r*.*" from package version + echo "r$_commitCount.$_commitTime" +} + +build() { + cd "${srcdir}/${pkgname}" + python -m build --wheel --no-isolation +} + +package() { + cd "${srcdir}/${pkgname}" + python -m installer --destdir="$pkgdir" dist/*.whl +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +} |