summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipe Nascimento2021-09-23 19:01:59 -0300
committerFilipe Nascimento2021-09-23 19:01:59 -0300
commit7d68f5a4d86d3e35a1c8bcc25b9a8d57c72de21c (patch)
tree566efb3196881b45b563d1b10dc040b18180a781
parentc3e435f6e8fc23346225b02a1afe258a658b63a9 (diff)
downloadaur-7d68f5a4d86d3e35a1c8bcc25b9a8d57c72de21c.tar.gz
upgpkg: python-diagrams 0.20.0-2
including image assets
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD18
-rw-r--r--resources.patch13
3 files changed, 31 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b2bb0919d896..9284974b44e5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-diagrams
pkgdesc = Diagram as Code for prototyping cloud system architectures
pkgver = 0.20.0
- pkgrel = 1
+ pkgrel = 2
url = https://diagrams.mingrammer.com
arch = any
license = MIT
@@ -9,7 +9,8 @@ pkgbase = python-diagrams
depends = python-graphviz
depends = python-jinja
source = https://files.pythonhosted.org/packages/source/d/diagrams/diagrams-0.20.0.tar.gz
+ source = resources.patch
sha256sums = a50743ed9274e194e7898820f69aa12868ae217003580ef9e7d0285132c9674a
+ sha256sums = a32edb9d779f786fd02632d95cdd0b22a45e3e845b3c63e8c9ab2491b6396732
pkgname = python-diagrams
-
diff --git a/PKGBUILD b/PKGBUILD
index 3a05623a21e2..6bea98a57185 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,15 +3,22 @@
pkgname=python-diagrams
_name=${pkgname//python-}
pkgver=0.20.0
-pkgrel=1
+pkgrel=2
pkgdesc="Diagram as Code for prototyping cloud system architectures"
arch=('any')
url="https://diagrams.mingrammer.com"
license=('MIT')
depends=('python-graphviz' 'python-jinja')
makedepends=('python-setuptools')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
-sha256sums=('a50743ed9274e194e7898820f69aa12868ae217003580ef9e7d0285132c9674a')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+ "resources.patch")
+sha256sums=('a50743ed9274e194e7898820f69aa12868ae217003580ef9e7d0285132c9674a'
+ 'a32edb9d779f786fd02632d95cdd0b22a45e3e845b3c63e8c9ab2491b6396732')
+
+prepare() {
+ cd $_name-$pkgver
+ patch -p1 < ../resources.patch
+}
build() {
cd $_name-$pkgver
@@ -21,5 +28,10 @@ build() {
package() {
cd $_name-$pkgver
python setup.py install --root "$pkgdir" --skip-build --optimize=1
+
+ local site_packages
+ site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ find resources/ -type f -exec install -Dm644 "{}" "$pkgdir/$site_packages/$_name/{}" \;
+
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
diff --git a/resources.patch b/resources.patch
new file mode 100644
index 000000000000..996dcdf288cd
--- /dev/null
+++ b/resources.patch
@@ -0,0 +1,13 @@
+diff --git a/diagrams/__init__.py b/diagrams/__init__.py
+index 6968bc4..a67c33e 100644
+--- a/diagrams/__init__.py
++++ b/diagrams/__init__.py
+@@ -418,7 +418,7 @@ class Node:
+
+ def _load_icon(self):
+ basedir = Path(os.path.abspath(os.path.dirname(__file__)))
+- return os.path.join(basedir.parent, self._icon_dir, self._icon)
++ return os.path.join(basedir, self._icon_dir, self._icon)
+
+
+ class Edge: