diff options
author | zhs | 2022-09-09 15:37:35 +0000 |
---|---|---|
committer | zhs | 2022-09-09 15:37:35 +0000 |
commit | 9fb3ed15af5357cb0dc43ca1e06babd529f4c2a2 (patch) | |
tree | 0f098338775c1fc80b2d7a62e379411f2f877ead | |
download | aur-9fb3ed15af5357cb0dc43ca1e06babd529f4c2a2.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | pyglossary.install | 4 |
3 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..da9c6a536afa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = pyglossary-git + pkgdesc = A tool for converting dictionary files aka glossaries with various formats for different dictionary applications, git version + pkgver = 4.5.0.r2732.g8f7d7cfd + pkgrel = 1 + url = https://github.com/ilius/pyglossary + install = pyglossary.install + arch = any + license = GPL3 + makedepends = python-setuptools + depends = python>=3.7.0 + optdepends = python-gobject: Gtk3-based interface + optdepends = tix: Tkinter-based interface + optdepends = python-prompt_toolkit: interactive command-line interface + optdepends = python-lxml: Many optional flags and formats + optdepends = python-beautifulsoup4: HTML parsing + optdepends = python-yaml: Reading from cc-kedict + optdepends = python-pyicu: Reading or writing Aard 2 (.slob) files + optdepends = python-marisa: Writing to Kobo E-Reader Dictionary + optdepends = python-lzo: Required for some MDX glossaries + optdepends = python-html5lib: Required to write to AppleDict + provides = pyglossary-git + conflicts = pyglossary + conflicts = pyglossary-git + source = git+https://github.com/ilius/pyglossary + sha256sums = SKIP + +pkgname = pyglossary-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..17725c5eaf10 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: zhs <zhao4she4@tuta.io> +# by and large a copy of the stable version one by sikmir@gmail.con with a few +# small modifications + +pkgname=pyglossary-git +_pkgname=pyglossary +pkgver=4.5.0.r2732.g8f7d7cfd +pkgrel=1 +pkgdesc="A tool for converting dictionary files aka glossaries with various formats for different dictionary applications, git version" +arch=(any) +url="https://github.com/ilius/pyglossary" +license=('GPL3') +# TODO add python-libzim if/when it exists +depends=('python>=3.7.0') +optdepends=( + 'python-gobject: Gtk3-based interface' + 'tix: Tkinter-based interface' + 'python-prompt_toolkit: interactive command-line interface' + 'python-lxml: Many optional flags and formats' + 'python-beautifulsoup4: HTML parsing' + 'python-yaml: Reading from cc-kedict' + 'python-pyicu: Reading or writing Aard 2 (.slob) files' + 'python-marisa: Writing to Kobo E-Reader Dictionary' + 'python-lzo: Required for some MDX glossaries' + 'python-html5lib: Required to write to AppleDict' +) +makedepends=('python-setuptools') +provides=("pyglossary-git") +conflicts=("pyglossary" "pyglossary-git") +source=("git+https://github.com/ilius/${_pkgname}") +sha256sums=('SKIP') + +pkgver() { + cd "${_pkgname}" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r'$(git rev-list --count HEAD)'.g/;s/-/./g' +} + +package() { + cd "${srcdir}/${_pkgname}" + # required to make the modified alternatives for libraries such as gzip to be + # loaded and used with python 3.10 + cp -R pyglossary/plugin_lib/py39 pyglossary/plugin_lib/py310 + python setup.py install --root="${pkgdir}/" --prefix=/usr --optimize=1 + cp config.json ${pkgdir}/usr/share/pyglossary +} + +install=pyglossary.install + +# vim:set ts=2 sw=2 et: diff --git a/pyglossary.install b/pyglossary.install new file mode 100644 index 000000000000..d532f74f0623 --- /dev/null +++ b/pyglossary.install @@ -0,0 +1,4 @@ +## arg 1: the new package version +post_install() { + echo "Make sure to install at least one of the optional interface dependencies." +} |