summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD30
1 files changed, 30 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..091915401333
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Ross Whitfield <whitfieldre@ornl.gov>
+pkgname=('python-nexusformat' 'python2-nexusformat')
+_pkgname=nexusformat
+pkgver=0.4.1
+pkgrel=1
+pkgdesc="Provides an API to open, create, and manipulate NeXus data."
+url="https://github.com/nexpy/nexusformat"
+arch=("any")
+license=('BSD')
+makedepends=('python-setuptools' 'python2-setuptools')
+source=("https://github.com/nexpy/nexusformat/archive/v${pkgver}.tar.gz")
+md5sums=('611a4247fde776f65aef4d844199d6cc')
+
+prepare() {
+ cp -a "${srcdir}/$_pkgname-$pkgver"{,-py2}
+}
+
+package_python-nexusformat() {
+ depends=('python-numpy' 'python-h5py')
+ cd "$srcdir/$_pkgname-$pkgver"
+ python setup.py install --root="$pkgdir/" --optimize=1
+}
+
+package_python2-nexusformat() {
+ depends=('python2-numpy' 'python2-h5py')
+ cd "$srcdir/$_pkgname-$pkgver-py2"
+ python2 setup.py install --root="$pkgdir/" --optimize=1
+ # Conflict with python3 version
+ mv $pkgdir/usr/bin/nxstack{,2}
+}