summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPhilipp A2017-02-03 13:40:41 +0100
committerPhilipp A2017-02-03 13:40:41 +0100
commit0ccd0a94ed0a23bc1e203aa1d52e989652da6096 (patch)
treecc46a80d76ae899948faebabd6d251554c7d739e /PKGBUILD
downloadaur-h5pyviewer.tar.gz
v0.0.1.6
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d9e2c280fb3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+_name=h5pyViewer
+pkgname=h5pyviewer
+pkgver=0.0.1.6
+pkgrel=1
+pkgdesc='Classes and tools to view *.hdf5-Files'
+url="https://github.com/ganymede42/$_name"
+depends=('python2' 'python2-h5py' 'python2-numpy' 'python2-matplotlib' 'wxpython')
+license=('BSD')
+arch=('any')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz" "$_name.desktop")
+md5sums=('da47fcfe8e05764abae49a174b6c8621'
+ '3be07481951e4a264ae9af04b001616c')
+
+build() {
+ cd "$srcdir/$_name-$pkgver"
+
+ python2 setup.py build
+
+ sed -i 's:#!/usr/bin/env python:#!/usr/bin/env python2:' $_name/*.py
+}
+
+
+package() {
+ cd "$srcdir/$_name-$pkgver"
+
+ install -d "$pkgdir/usr/bin"
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ install -Dm755 "$srcdir/$_name.desktop" "$pkgdir/usr/share/applications/$_name.desktop"
+
+ for link in "$pkgdir/usr/bin/"*; do
+ local abs_target="$(readlink "$link")"
+ local rel_target="$(realpath --relative-to="$pkgdir" "$abs_target")"
+ ln -sfT "/$rel_target" "$link"
+ done
+}