summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingbei Li2016-10-16 20:09:53 +0800
committerJingbei Li2016-10-16 20:09:53 +0800
commit6de5826bcf3e7f034443940f64ffc089cc713281 (patch)
tree9ada7a2cb18b020a43f21f837683d9287ae385ad
downloadaur-6de5826bcf3e7f034443940f64ffc089cc713281.tar.gz
Initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD41
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..591a1c125089
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Sun Oct 16 12:09:29 UTC 2016
+pkgbase = torch7-warp-ctc
+ pkgdesc = A fast parallel implementation of CTC, on both CPU and GPU.
+ pkgver = r56.5bfb46e
+ pkgrel = 1
+ url = https://github.com/baidu-research/warp-ctc
+ arch = x86_64
+ arch = i686
+ license = APACHE
+ makedepends = cmake
+ makedepends = git
+ makedepends = gcc5
+ depends = torch7-git>=r819
+ optdepends = cuda: For GPU support
+ source = torch7-warp-ctc::git+https://github.com/baidu-research/warp-ctc
+ sha512sums = SKIP
+
+pkgname = torch7-warp-ctc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c2fc1c053b0f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Jingbei Li <i@jingbei.lli>
+pkgdesc='A fast parallel implementation of CTC, on both CPU and GPU.'
+pkgname='torch7-warp-ctc'
+pkgver=r56.5bfb46e
+pkgrel=1
+makedepends=('cmake' 'git' 'gcc5')
+depends=('torch7-git>=r819')
+optdepends=('cuda: For GPU support')
+arch=('x86_64' 'i686')
+url='https://github.com/baidu-research/warp-ctc'
+license=('APACHE')
+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/luajit/luajit-5.1/g' -i CMakeLists.txt
+ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package () {
+ cd "${pkgname}"
+ # Move Lua C module
+ mkdir -p "${pkgdir}/usr/lib/lua/5.1"
+ install -Dm755 "libwarpctc.so" "${pkgdir}/usr/lib/"
+ install -Dm755 "libwarp_ctc.so" "${pkgdir}/usr/lib/lua/5.1/"
+
+ # Move pure Lua modules
+ mkdir -p "${pkgdir}/usr/share/lua/5.1/warp_ctc"
+ install -Dm644 "torch_binding/init.lua" "${pkgdir}/usr/share/lua/5.1/warp_ctc"
+}