summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRacial2016-12-08 22:09:39 +0800
committerRacial2016-12-08 22:09:39 +0800
commit11276772b92333e79a18b80578c11adc7f114124 (patch)
tree30b1cfdedc5b653d122b6285c44a9ccf78fd139a
downloadaur-1127677.tar.gz
the torch7-moses-git still has some problem
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD42
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ac5b83fe28f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Thu Dec 8 14:07:31 UTC 2016
+pkgbase = torch7-dpnn-git
+ pkgdesc = deep extension to nn Modules and Criterions for Torch7
+ pkgver = r510.718a231
+ pkgrel = 1
+ url = https://github.com/Element-Research/dpnn
+ arch = x86_64
+ arch = i686
+ license = BSD
+ makedepends = cmake
+ makedepends = git
+ depends = torch7-git
+ depends = torch7-nn-git
+ depends = torch7-nnx-git
+ depends = torch7-moses-git
+ source = torch7-dpnn-git::git+https://github.com/Element-Research/dpnn
+ md5sums = SKIP
+
+pkgname = torch7-dpnn-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ac840b7d869
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Jingbei Li <i@jingbei.li>
+# Contributor: Ziwei Zhu <zhuziwei1@outlook.com>
+pkgdesc='deep extension to nn Modules and Criterions for Torch7'
+pkgname='torch7-dpnn-git'
+pkgver=r510.718a231
+pkgrel=1
+makedepends=('cmake' 'git')
+depends=('torch7-git' 'torch7-nn-git' 'torch7-nnx-git' 'torch7-moses-git')
+arch=('x86_64' 'i686')
+url='https://github.com/Element-Research/dpnn'
+license=('BSD')
+source=("${pkgname}::git+${url}")
+md5sums=('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}"
+ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package () {
+ cd "${pkgname}"
+ make DESTDIR="${pkgdir}" install
+
+ # Move Lua C module
+ #mkdir -p "${pkgdir}/usr/lib/lua/5.1"
+ #mv "${pkgdir}/usr/lib/libTHNN.so" "${pkgdir}/usr/lib/lua/5.1/"
+
+ # Move pure Lua modules
+ mkdir -p "${pkgdir}/usr/share/lua/5.1"
+ mv "${pkgdir}/usr/lua/dpnn" "${pkgdir}/usr/share/lua/5.1/"
+ rm -rf "${pkgdir}/usr/lua"
+}