diff options
author | etckeeper | 2020-12-02 16:48:40 +0100 |
---|---|---|
committer | etckeeper | 2020-12-02 16:48:40 +0100 |
commit | cb9af426a36f84a8c1603b29bb2ff9430aa41e65 (patch) | |
tree | 5b2ee343377b97c89dcf98f2bc0647907c20d6c5 | |
download | aur-cb9af426a36f84a8c1603b29bb2ff9430aa41e65.tar.gz |
initial version
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 48 |
2 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a0084a641a03 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = python-matplotlib-sixel-git + pkgdesc = a sixel graphics backend for matplotlib + pkgver = r9.27df6fa + pkgrel = 1 + url = https://github.com/koppa/matplotlib-sixel + arch = any + license = BSD + makedepends = git + makedepends = python-setuptools + depends = python + depends = python-matplotlib + depends = python-numpy + provides = python-matplotlib-sixel + conflicts = python-matplotlib-sixel + source = git+https://github.com/koppa/matplotlib-sixel + sha256sums = SKIP + +pkgname = python-matplotlib-sixel-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ad85080f4968 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: #BrainDamage + +pkgname=python-matplotlib-sixel-git +pkgver=r9.27df6fa +pkgrel=1 +pkgdesc="a sixel graphics backend for matplotlib " +arch=('any') +url="https://github.com/koppa/matplotlib-sixel" +license=('BSD') +makedepends=('git' 'python-setuptools') +depends=('python' 'python-matplotlib' 'python-numpy') +source=("git+${url}") +sha256sums=('SKIP') + +# strip the -git suffix from name +_dirname="${pkgname%-git}" +_basename="${pkgname%-git}" + +# conflict/provide the same package as the non -git version +provides=("${_basename}") +conflicts=("${_basename}") + +# strip the python- prefix from names if present +_dirname="${_dirname#python-}" +_basename="${_basename#python-}" + +pkgver() { + cd "${srcdir}/${_dirname}" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) + # 0.9.9.r27.g2b039da # if tags exist + # r1581.2b039da # else fallback +} + + +build() { + cd "${srcdir}/${_dirname}" + python setup.py build +} + +package() { + cd "${srcdir}/${_dirname}" + python setup.py install --optimize=1 --skip-build --root="${pkgdir}/" --prefix="/usr" + # not necessary for every package, but for those who it is, it'd generate conflict with others otherwise + rm -rf "${pkgdir}/$(python -c 'import site; print(site.getsitepackages()[0])')/tests/" +} |