summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJingbei Li2016-11-01 17:36:40 +0800
committerJingbei Li2016-11-01 17:36:40 +0800
commite4c12416dca53e22df57edde6b863e255eededdb (patch)
tree5a2396c0616e01547d6dbe8995e0ac3c8929e080 /PKGBUILD
downloadaur-e4c12416dca53e22df57edde6b863e255eededdb.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f8f62195b4a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Jingbei Li <i@jingbei.lli>
+pkgname='torch7-hdf5-git'
+pkgdesc='Torch interface to HDF5 library'
+pkgver=v0.0.r116.g639bb4e
+pkgrel=1
+makedepends=('cmake' 'git')
+depends=('torch7-git>=r819' 'hdf5-cpp-fortran')
+arch=('x86_64' 'i686')
+url='https://github.com/deepmind/torch-hdf5'
+license=('BSD')
+source=("${pkgname}::git+${url}")
+sha512sums=('SKIP')
+
+pkgver () {
+ cd "${pkgname}"
+ (
+ 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)"
+ )
+}
+
+build () {
+ cd "${pkgname}"
+ sed 's/^FILE(WRITE /FILE(WRITE ${DESTDIR}/' -i CMakeLists.txt
+ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DDESTDIR="${pkgdir}"
+ make
+}
+
+package () {
+ cd "${pkgname}"
+ make DESTDIR="${pkgdir}" install
+
+ # Move pure Lua modules
+ mkdir -p "${pkgdir}/usr/share/lua/5.1"
+ mv "${pkgdir}/usr/lua/hdf5" "${pkgdir}/usr/share/lua/5.1/"
+ rm -rf "${pkgdir}/usr/lua"
+}