[lua-torch-torch7] 01/01: Initialize packaging, release to experimental

Zhou Mo cdluminate-guest at moszumanska.debian.org
Wed Jun 8 09:29:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

cdluminate-guest pushed a commit to branch master
in repository lua-torch-torch7.

commit 4e523fc8620e4d6f0db85e6e33bd1be150d1859c
Author: Zhou Mo <cdluminate at gmail.com>
Date:   Wed Jun 8 09:29:01 2016 +0000

    Initialize packaging, release to experimental
---
 debian/README.Debian                      |   8 +++
 debian/changelog                          |   5 ++
 debian/clean                              |   4 ++
 debian/compat                             |   1 +
 debian/control                            | 101 ++++++++++++++++++++++++++++++
 debian/copyright                          |  96 ++++++++++++++++++++++++++++
 debian/libtorch-luat-dev.install          |   1 +
 debian/libtorch-luat.install              |   1 +
 debian/libtorch-luat.lintian-overrides    |   9 +++
 debian/libtorch-luat.triggers             |   1 +
 debian/libtorch-th-dev.install            |   1 +
 debian/libtorch-th.install                |   1 +
 debian/libtorch-th.lintian-overrides      |   8 +++
 debian/libtorch-th.triggers               |   1 +
 debian/lua-torch-torch7.docs              |   1 +
 debian/lua-torch-torch7.lintian-overrides |   3 +
 debian/lua5.1.dh-lua.conf                 |  20 ++++++
 debian/patches/fix-spelling-error         |  15 +++++
 debian/patches/series                     |   2 +
 debian/rules                              |  92 +++++++++++++++++++++++++++
 debian/source/format                      |   1 +
 debian/source/local-options               |   2 +
 debian/torch-th-dev.install               |   1 +
 debian/watch                              |   2 +
 24 files changed, 377 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..1956d73
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,8 @@
+lua-torch for Debian
+
+Please edit this to provide information specific to 
+this lua-torch Debian package.
+
+    (Automatically generated by debmake Version 4.2.5)
+
+ -- Zhou Mo <cdluminate at gmail.com>  Mon, 06 Jun 2016 03:50:31 +0000
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..d557965
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+lua-torch-torch7 (0~20160604-g69d7a01-1) experimental; urgency=low
+
+  * Initial release. Closes: #826532
+
+ -- Zhou Mo <cdluminate at gmail.com>  Mon, 06 Jun 2016 03:50:31 +0000
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..8e33248
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,4 @@
+debian/lua-torch-torch7-dev.install
+debian/lua-torch-torch7.install
+debian/lua_versions
+debian/trash
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..6dd2b81
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,101 @@
+Source: lua-torch-torch7
+Section: interpreters
+Priority: optional
+Maintainer: Zhou Mo <cdluminate at gmail.com>
+Build-Depends: cmake,
+               debhelper (>=9),
+               dh-lua,
+               lua5.1,
+# luajit (<= 2.0) suffers from compatibility problem, 
+# using luajit from experimental
+               luajit (>= 2.1.0~beta2),
+               lua-torch-cwrap,
+               lua-torch-paths,
+               libblas-dev | libblas.so,
+Standards-Version: 3.9.8
+Homepage: https://github.com/torch/torch7
+
+Package: lua-torch-torch7
+Architecture: any
+Multi-Arch: same
+# NOTE: users are expected to use luajit.
+# NOTE: this package won't support lua5.2 .
+Depends: ${misc:Depends}, ${shlibs:Depends}, luajit | lua5.1 ,
+         libtorch-th, libtorch-luat, lua-torch-cwrap,
+         lua-torch-paths,
+Suggests: luajit
+XB-Lua-Versions: ${lua:Versions}
+Description: Torch Package for Torch Framework
+ Torch is the main package in Torch7 where data structures for
+ multi-dimensional tensors and mathematical operations over these
+ are defined. Additionally, it provides many utilities for accessing
+ files, serializing objects of arbitrary types and other useful utilities.
+
+Package: lua-torch-torch7-dev
+Architecture: any
+Section: libdevel
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}, luajit | lua5.1 ,
+         lua-torch-torch7 (= ${binary:Version})
+XB-Lua-Versions: ${lua:Versions}
+Description: Torch Package for Torch Framework (dev)
+ Torch is the main package in Torch7 where data structures for
+ multi-dimensional tensors and mathematical operations over these
+ are defined. Additionally, it provides many utilities for accessing
+ files, serializing objects of arbitrary types and other useful utilities.
+ .
+ This package contains development files.
+
+Package: libtorch-th
+Architecture: any
+Section: libs
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends},
+         libblas3 | libblas.so.3,
+         liblapack3 | liblapack.so.3,
+Description: libTH.so of Torch Package for Torch Framework
+ Torch is the main package in Torch7 where data structures for
+ multi-dimensional tensors and mathematical operations over these
+ are defined. Additionally, it provides many utilities for accessing
+ files, serializing objects of arbitrary types and other useful utilities.
+ .
+ This package contains libTH.so .
+
+Package: libtorch-th-dev
+Architecture: any
+Section: libdevel
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}, libtorch-th (= ${binary:Version})
+Description: libTH.so of Torch Package for Torch Framework (dev)
+ Torch is the main package in Torch7 where data structures for
+ multi-dimensional tensors and mathematical operations over these
+ are defined. Additionally, it provides many utilities for accessing
+ files, serializing objects of arbitrary types and other useful utilities.
+ .
+ This package contains development files for libTH.so .
+
+Package: libtorch-luat
+Architecture: any
+Section: libs
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: libluaT.so of Torch Package for Torch Framework
+ Torch is the main package in Torch7 where data structures for
+ multi-dimensional tensors and mathematical operations over these
+ are defined. Additionally, it provides many utilities for accessing
+ files, serializing objects of arbitrary types and other useful utilities.
+ .
+ This package contains libluaT.so .
+
+Package: libtorch-luat-dev
+Architecture: any
+Section: libdevel
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}, libtorch-luat (= ${binary:Version})
+Description: libluaT.so of Torch Package for Torch Framework (dev)
+ Torch is the main package in Torch7 where data structures for
+ multi-dimensional tensors and mathematical operations over these
+ are defined. Additionally, it provides many utilities for accessing
+ files, serializing objects of arbitrary types and other useful utilities.
+ .
+ This package contains development files for libluaT.so .
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..7cdcb86
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,96 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: torch-torch7
+Source: http://github.com/torch/torch7
+
+Files:     *
+Copyright: 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
+           2006 Idiap Research Institute (Samy Bengio)
+           2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
+           2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
+           2011-2013 NYU (Clement Farabet)
+           2011-2014 Idiap Research Institute (Ronan Collobert)
+           2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
+License:   BSD-3-Clause-slightly-changed
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ 3. Neither the names of Deepmind Technologies, NYU, NEC Laboratories America
+ and IDIAP Research Institute nor the names of its contributors may be
+ used to endorse or promote products derived from this software without
+ specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+Files:     lib/TH/THRandom.c
+Copyright: 1997-2002 Makoto Matsumoto and Takuji Nishimura,
+License:   BSD-3-Clause-THRandom_c
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ 3. The names of its contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files:     debian/*
+Copyright: 2016 Zhou Mo <cdluminate at gmail.com>
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
+ A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE HOLDERS OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/debian/libtorch-luat-dev.install b/debian/libtorch-luat-dev.install
new file mode 100644
index 0000000..a2dd3d0
--- /dev/null
+++ b/debian/libtorch-luat-dev.install
@@ -0,0 +1 @@
+usr/include/luaT.h
diff --git a/debian/libtorch-luat.install b/debian/libtorch-luat.install
new file mode 100644
index 0000000..893625e
--- /dev/null
+++ b/debian/libtorch-luat.install
@@ -0,0 +1 @@
+usr/lib/#DEB_HOST_MULTIARCH#/libluaT.so
diff --git a/debian/libtorch-luat.lintian-overrides b/debian/libtorch-luat.lintian-overrides
new file mode 100644
index 0000000..f04cd0d
--- /dev/null
+++ b/debian/libtorch-luat.lintian-overrides
@@ -0,0 +1,9 @@
+# this library is used as extension of lua-torch-torch7,
+# and libtorch-luat won't pollute the package name space,
+# which is better than the confusing "libluat"
+libtorch-luat: package-name-doesnt-match-sonames libluaT
+
+# upstream doesn't make release, and there is no SOVERSION
+libtorch-luat: shlib-without-versioned-soname
+libtorch-luat: dev-pkg-without-shlib-symlink
+
diff --git a/debian/libtorch-luat.triggers b/debian/libtorch-luat.triggers
new file mode 100644
index 0000000..dd86603
--- /dev/null
+++ b/debian/libtorch-luat.triggers
@@ -0,0 +1 @@
+activate-noawait ldconfig
diff --git a/debian/libtorch-th-dev.install b/debian/libtorch-th-dev.install
new file mode 100644
index 0000000..d9eddb8
--- /dev/null
+++ b/debian/libtorch-th-dev.install
@@ -0,0 +1 @@
+usr/include/TH
diff --git a/debian/libtorch-th.install b/debian/libtorch-th.install
new file mode 100644
index 0000000..dd4f38d
--- /dev/null
+++ b/debian/libtorch-th.install
@@ -0,0 +1 @@
+usr/lib/libTH.so usr/lib/#DEB_HOST_MULTIARCH#/
diff --git a/debian/libtorch-th.lintian-overrides b/debian/libtorch-th.lintian-overrides
new file mode 100644
index 0000000..0e8c980
--- /dev/null
+++ b/debian/libtorch-th.lintian-overrides
@@ -0,0 +1,8 @@
+# this library generally works as lua extension, and
+# is not a general library. I name it as libtorch-th
+# to avoid polluting package name space.
+libtorch-th: package-name-doesnt-match-sonames
+
+# upstream doesn't make releases, and there is no SOVERSION
+libtorch-th: dev-pkg-without-shlib-symlink
+libtorch-th: shlib-without-versioned-soname
diff --git a/debian/libtorch-th.triggers b/debian/libtorch-th.triggers
new file mode 100644
index 0000000..dd86603
--- /dev/null
+++ b/debian/libtorch-th.triggers
@@ -0,0 +1 @@
+activate-noawait ldconfig
diff --git a/debian/lua-torch-torch7.docs b/debian/lua-torch-torch7.docs
new file mode 100644
index 0000000..a2e6bd4
--- /dev/null
+++ b/debian/lua-torch-torch7.docs
@@ -0,0 +1 @@
+doc/
diff --git a/debian/lua-torch-torch7.lintian-overrides b/debian/lua-torch-torch7.lintian-overrides
new file mode 100644
index 0000000..f1a86d4
--- /dev/null
+++ b/debian/lua-torch-torch7.lintian-overrides
@@ -0,0 +1,3 @@
+# the contained shared libraries work as lua extension, and
+# are generally not general libraries.
+lua-torch-torch7: package-name-doesnt-match-sonames
diff --git a/debian/lua5.1.dh-lua.conf b/debian/lua5.1.dh-lua.conf
new file mode 100644
index 0000000..bdc30c3
--- /dev/null
+++ b/debian/lua5.1.dh-lua.conf
@@ -0,0 +1,20 @@
+PKG_NAME=torch-torch7
+LUA_MODNAME=libtorch
+LUA_VERSION=5.1
+
+# random.lua and TensorMath.lua are C code generators, don't install them
+#LUA_SOURCES=$(filter-out random.lua, $(filter-out TensorMath.lua, $(wildcard torch/*.lua))) $(wildcard torch/test/*.lua)
+LUA_SOURCES=$(foreach LUAFILE,CmdLine.lua File.lua Tensor.lua FFI.lua init.lua Tester.lua TestSuite.lua test/test.lua,torch/$(LUAFILE))
+LUA_SOURCES_MANGLER= sed 's@^torch/test at torch/@g'
+#LUA_HEADER=$(wildcard torch/*.h) $(wildcard generic/*)
+LUA_HEADER= torch.h
+
+
+#CLIB_OBJS=$(foreach P,$(filter-out .c,$(wildcard torch/*.c)),P.lo)
+#CLIB_OBJS= libtorch.lo
+CLIB_OBJS= DiskFile.lo File.lo MemoryFile.lo PipeFile.lo Storage.lo Tensor.lo Timer.lo utils.lo init.lo TensorOperator.lo TensorMath.lo random.lo Generator.lo
+
+CLIB_CFLAGS= -I$(shell pwd) -I$(shell pwd)/generic -I/usr/include/lua5.1 -I$(shell pwd)/lib/luaT -I$(shell pwd)/lib/TH -I$(shell pwd)/TH.build/
+CLIB_LDFLAGS= -L$(shell pwd)/TH.build -L$(shell pwd)/luaT.build -lTH -lluaT
+#CLIB_LDFLAGS= -undefined dynamic_lookup
+LUA_TEST=
diff --git a/debian/patches/fix-spelling-error b/debian/patches/fix-spelling-error
new file mode 100644
index 0000000..868b081
--- /dev/null
+++ b/debian/patches/fix-spelling-error
@@ -0,0 +1,15 @@
+Fix spelling
+
+Forwarded: not yet
+
+--- a/lib/TH/THDiskFile.c
++++ b/lib/TH/THDiskFile.c
+@@ -207,7 +207,7 @@
+   if (offset > -1)
+       return (size_t)offset;
+   else if(!dfself->file.isQuiet)
+-      THError("unable to obtain disk file offset (maybe a long overflow occured)");
++      THError("unable to obtain disk file offset (maybe a long overflow occurred)");
+ 
+   return 0;
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e918ec3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+# You must remove unused comment lines for the released package.
+fix-spelling-error
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..7592ba0
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,92 @@
+#!/usr/bin/make -f
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+DEB_HOST_MULTIARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+TMP=$(shell pwd)/debian/tmp
+LUA51=/usr/bin/lua5.1
+LUAJIT=/usr/bin/luajit
+ROOTDIR=$(shell pwd)
+
+TORCH_FLAGS_5_1= \
+ -DLUA=/usr/bin/lua5.1 \
+ -DLUA_INCDIR=/usr/include/lua5.1 \
+ -DLUA_LIBDIR=/usr/lib \
+ -DLUA_BINDIR=/usr/bin \
+ -DLIBDIR=/usr/lib \
+ -DLUALIB=lua5.1 \
+ -DTorch_INSTALL_BIN_SUBDIR=bin/ \
+ -DTorch_INSTALL_LIB_SUBDIR=lib/$(DEB_HOST_MULTIARCH)/ \
+ -DTorch_INSTALL_INCLUDE_SUBDIR=include/ \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_BLAS=generic
+
+%:
+	dh $@ --buildsystem=lua --with lua --parallel
+
+override_dh_auto_configure:
+	ln -s . torch
+	# configure libTH.so
+	set -e; if ! test -d TH.build; then mkdir TH.build; fi
+	set -e; cd TH.build; cmake ../lib/TH $(TORCH_FLAGS_5_1) \
+		-DTorch_INSTALL_CMAKE_SUBDIR=/usr/share/libtorch-th-dev/
+	# configure libluaT.so
+	set -e; if ! test -d luaT.build; then mkdir luaT.build; fi
+	set -e; cd luaT.build; cmake ../lib/luaT $(TORCH_FLAGS_5_1) \
+		-DTorch_INSTALL_CMAKE_SUBDIR=/usr/share/libtorch-luat-dev/
+	# configure the rest lua stuff
+	dh_auto_configure --buildsystem=lua
+	# generate random.c and TensorMath.c
+	$(LUA51) random.lua random.c
+	$(LUA51) TensorMath.lua TensorMath.c
+	# generate torch7.h
+	printf "/* Generated by Debian Package */\nint luaopen_libtorch (lua_State *L);\n" > torch.h
+	# generate install template
+	sed -i -e 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/g' debian/libtorch-th.install
+	sed -i -e 's/#DEB_HOST_MULTIARCH#/$(DEB_HOST_MULTIARCH)/g' debian/libtorch-luat.install
+
+override_dh_auto_build:
+	# build libTH.so
+	dh_auto_build --buildsystem=cmake -B TH.build/ --parallel
+	# build libluaT.so
+	dh_auto_build --buildsystem=cmake -B luaT.build/ --parallel
+	# build the rest lua stuff
+	dh_auto_build --buildsystem=lua
+
+override_dh_auto_test:
+	-$(RM) -rf deb.test
+	# prepare lua files to launch a "torch.test()"
+	set -e; if ! test -d deb.test/torch; then mkdir -p deb.test/torch; fi
+	set -e; find . -name '*.so*' -exec cp -v '{}' deb.test/ \;
+	set -e; find . -name '*.lua' -exec cp -v '{}' deb.test/torch/ \;
+	set -e; cd deb.test; \
+		LD_LIBRARY_PATH=$(ROOTDIR)/deb.test \
+		$(LUAJIT) -e "require 'torch'; torch.test();"
+	# then we perform tests provided by upstream.
+	set -e; cd deb.test; $(LUAJIT) -e "require 'torch'; dofile('../test/longSize.lua')"
+	set -e; cd deb.test; $(LUAJIT) -e "require 'torch'; dofile('../test/test_qr.lua')"
+	#set -e; cd deb.test; $(LUAJIT) -e "require 'torch'; dofile('../test/test_Multinomial.lua')" # require 'sys'
+	set -e; cd deb.test; $(LUAJIT) -e "require 'torch'; dofile('../test/test_Tester.lua')"
+	#set -e; cd deb.test; $(LUAJIT) -e "require 'torch'; dofile('../test/test_sharedmem.lua')" # unknown error
+	set -e; cd deb.test; $(LUAJIT) -e "require 'torch'; dofile('../test/test_writeObject.lua')"
+	#set -e; cd deb.test; $(LUAJIT) -e "require 'torch'; dofile('../test/timeSort.lua')" # require 'gnuplot'
+	dh_auto_test
+
+override_dh_auto_install:
+	# install libTH.so
+	dh_auto_install --buildsystem=cmake -B TH.build
+	# install libluaT.so
+	dh_auto_install --buildsystem=cmake -B luaT.build
+	# install the rest lua stuff
+	dh_auto_install --buildsystem=lua
+
+override_dh_auto_clean:
+	-$(RM) -rf TH.build/ luaT.build/ torch
+	-$(RM) -rf 5.1-torch-torch7/ 5.2-torch-torch7/
+	-$(RM) libtorch.c random.c TensorMath.c torch.h
+	-$(RM) -rf deb.test
+	-$(RM) test/*.bin
+	dh_auto_clean
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..00131ee
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1,2 @@
+#abort-on-upstream-changes
+#unapply-patches
diff --git a/debian/torch-th-dev.install b/debian/torch-th-dev.install
new file mode 100644
index 0000000..d9eddb8
--- /dev/null
+++ b/debian/torch-th-dev.install
@@ -0,0 +1 @@
+usr/include/TH
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..76575dc
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+# You must remove unused comment lines for the released package.
+version=3

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lua-torch-torch7.git



More information about the debian-science-commits mailing list