[lua-torch-trepl] 01/01: Initialize Packaging
Zhou Mo
cdluminate-guest at moszumanska.debian.org
Sat Jun 18 08:15:32 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-trepl.
commit 067a580af81442e3dc6b5985396bce9419979c57
Author: Zhou Mo <cdluminate at gmail.com>
Date: Sat Jun 18 08:15:22 2016 +0000
Initialize Packaging
---
debian/changelog | 5 ++
debian/clean | 3 ++
debian/compat | 1 +
debian/control | 57 +++++++++++++++++++++
debian/copyright | 60 ++++++++++++++++++++++
debian/lua-torch-trepl.docs | 2 +
debian/lua-torch-trepl.links | 6 +++
debian/lua-torch-trepl.lintian-overrides | 3 ++
debian/lua5.1.dh-lua.conf | 11 ++++
debian/patches/series | 1 +
debian/patches/tweak-interpreter | 9 ++++
debian/rules | 13 +++++
debian/source/format | 1 +
debian/source/local-options | 2 +
debian/th | 24 +++++++++
debian/th.1 | 86 ++++++++++++++++++++++++++++++++
debian/th.1.txt | 38 ++++++++++++++
debian/torch-trepl.install | 2 +
debian/torch-trepl.manpages | 1 +
19 files changed, 325 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..9555e75
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+lua-torch-trepl (0~20160613-g06128f9-1) experimental; urgency=low
+
+ * Initial release. Closes: #826791
+
+ -- Zhou Mo <cdluminate at gmail.com> Fri, 03 Jun 2016 14:23:29 +0000
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..ffe1877
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,3 @@
+debian/lua-torch-trepl-dev.install
+debian/lua-torch-trepl.install
+debian/lua_versions
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..ebe82e4
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,57 @@
+Source: lua-torch-trepl
+Section: interpreters
+Priority: optional
+Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
+Uploaders: Zhou Mo <cdluminate at gmail.com>
+Build-Depends: cmake,
+ debhelper (>=9),
+ dh-lua,
+ libreadline6-dev,
+ lua-torch-torch7,
+Standards-Version: 3.9.8
+Homepage: https://github.com/torch/trepl
+Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/lua-torch-trepl.git
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/lua-torch-trepl.git
+
+Package: lua-torch-trepl
+Architecture: any
+Multi-Arch: same
+Depends: lua-penlight, lua5.1 | luajit, ${misc:Depends}, ${shlibs:Depends}
+Suggests: lua-torch-dok, lua-torch-sys, lua-torch-xlua
+XB-Lua-Versions: ${lua:Versions}
+Description: REPL Package for Troch Framework
+ A pure Lua REPL (Read,Eval,Print-Loop) for LuaJIT, with heavy
+ support for Torch types. It uses Readline for tab completion.
+ .
+ This package contains backend files to support the command line
+ frontend 'th'.
+
+Package: torch-trepl
+Architecture: any
+Multi-Arch: foreign
+Depends: lua-torch-trepl (>= ${source:Version}),
+ lua-torch-trepl (<< ${source:Version}.1~),
+ luajit, ${misc:Depends}
+Description: REPL Package for Troch Framework
+ A pure Lua REPL (Read,Eval,Print-Loop) for LuaJIT, with heavy
+ support for Torch types. It uses Readline for tab completion.
+ .
+ This package also installs command line frontend `th`, which
+ comes packed with all these features:
+ .
+ * Tab-completion on nested namespaces
+ * Tab-completion on disk files (when opening a string)
+ * History
+ * Pretty print (table introspection and coloring)
+ * Auto-print after eval (can be stopped with ;)
+ * Each command is profiled, timing is reported
+ * No need for '=' to print
+ * Easy help with: `? funcname`
+ * Self help: `?`
+ * Shell commands with: $ cmd (example: `$ ls`)
+ * Print all user globals with `who()`
+ * Import a package's symbols globally with `import(package)`
+ * Require is overloaded to provide relative search paths:
+ `require('./mylocallib/')`
+ * [Optional] strict global namespace monitoring
+ * [Optional] async repl
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..e4ef5b3
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,60 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: torch/trepl
+Source: http://github.com/torch/trepl
+
+Files: *
+Copyright:
+ Copyright (c) 2015, Torch Developers
+ All rights reserved.
+License: Torch-BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ .
+ * 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.
+ .
+ * Neither the name of trepl 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 HOLDER 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/lua-torch-trepl.docs b/debian/lua-torch-trepl.docs
new file mode 100644
index 0000000..b3f4d9c
--- /dev/null
+++ b/debian/lua-torch-trepl.docs
@@ -0,0 +1,2 @@
+README.md
+doc/
diff --git a/debian/lua-torch-trepl.links b/debian/lua-torch-trepl.links
new file mode 100644
index 0000000..bb551b7
--- /dev/null
+++ b/debian/lua-torch-trepl.links
@@ -0,0 +1,6 @@
+# See top part of init.lua,
+# readline.so is required to enable tab-completion functionality
+# of trepl, however the object file readline.* is compiled into
+# treplutils.so, so we link treplutils.so to readline.so, or
+# the tab-completion will be broken.
+usr/lib/x86_64-linux-gnu/lua/5.1/treplutils.so usr/lib/x86_64-linux-gnu/lua/5.1/readline.so
diff --git a/debian/lua-torch-trepl.lintian-overrides b/debian/lua-torch-trepl.lintian-overrides
new file mode 100644
index 0000000..1488a57
--- /dev/null
+++ b/debian/lua-torch-trepl.lintian-overrides
@@ -0,0 +1,3 @@
+# This is a lua package, and .so libraries from this package is
+# not for general usage but lua extension.
+lua-torch-trepl: package-name-doesnt-match-sonames liblua5.1-torch-trepl0
diff --git a/debian/lua5.1.dh-lua.conf b/debian/lua5.1.dh-lua.conf
new file mode 100644
index 0000000..8622e1e
--- /dev/null
+++ b/debian/lua5.1.dh-lua.conf
@@ -0,0 +1,11 @@
+PKG_NAME=torch-trepl
+LUA_MODNAME=treplutils
+LUA_VERSION=5.1
+
+LUA_SOURCES=$(wildcard trepl/*.lua)
+LUA_HEADER=
+CLIB_OBJS= utils.lo readline.lo
+
+CLIB_CFLAGS= -I$(shell pwd)
+CLIB_LDFLAGS= -L$(shell pwd) -lreadline
+LUA_TEST=
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..abf307b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+tweak-interpreter
diff --git a/debian/patches/tweak-interpreter b/debian/patches/tweak-interpreter
new file mode 100644
index 0000000..aa5f492
--- /dev/null
+++ b/debian/patches/tweak-interpreter
@@ -0,0 +1,9 @@
+Purpose: silent lintian
+Forward: not, don'd forward.
+--- a/th
++++ b/th
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env luajit
+
+ loadstring = loadstring or load -- for lua 5.2 compat
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..05cd917
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+export DEB_BUILD_MAINT_OPTIONS= hardening=+all
+
+%:
+ dh $@ --buildsystem=lua --with lua
+
+override_dh_auto_configure:
+ ln -s . trepl
+ dh_auto_configure
+
+override_dh_auto_clean:
+ -$(RM) -rf 5.1-torch-trepl 5.2-torch-trepl debian/trash trepl
+ 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/th b/debian/th
new file mode 100755
index 0000000..036c0f1
--- /dev/null
+++ b/debian/th
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Wrapper for Debian Torch Packages
+# Copyright (C) 2016 Zhou Mo <cdluminate at gmail.com>
+# BSD-3-Clause
+set -e
+
+# the real trepl script
+TREPL=/usr/lib/torch-trepl/th
+
+# probe lua interpreters, only luajit (recommend) and
+# lua5.1 are supported. Here I don't use hardcoded lua
+# interpreter path so user can override the default
+# interpreter without modifying this script.
+which luajit 1>/dev/null && \
+ LUA=$(which luajit) || \
+ printf "I: luajit not found, falling back to lua5.1\n";
+if test -z "$LUA"; then
+ which lua5.1 1>/dev/null && \
+ LUA=$(which lua5.1) || \
+ (printf "E: lua5.1 not found.\n"; false)
+fi
+
+# run the real trepl script with possible arguments
+exec $LUA $TREPL "$@"
diff --git a/debian/th.1 b/debian/th.1
new file mode 100644
index 0000000..3b2de83
--- /dev/null
+++ b/debian/th.1
@@ -0,0 +1,86 @@
+.\"Text automatically generated by txt2man
+.TH torch-trepl 1 "18 June 2016" "" ""
+.SH NAME
+\fBth \fP- Read,Eval,Print-Loop for Torch Framework
+.SH SYNOPSIS
+.nf
+.fam C
+\fBth\fP [\fIoptions\fP] [script.lua [\fIarguments\fP]]
+.fam T
+.fi
+.fam T
+.fi
+.SH DESCRIPTION
+A pure Lua REPL (Read,Eval,Print-Loop) for LuaJIT, with heavy
+support for Torch types. It uses Readline for tab completion.
+.
+This package also installs command line frontend `\fBth\fP`, which
+comes packed with all these features:
+.
+.RS
+.IP \(bu 3
+Tab-completion on nested namespaces
+.IP \(bu 3
+Tab-completion on disk files (when opening a string)
+.IP \(bu 3
+History
+.IP \(bu 3
+Pretty print (table introspection and coloring)
+.IP \(bu 3
+Auto-print after eval (can be stopped with ;)
+.IP \(bu 3
+Each command is profiled, timing is reported
+.IP \(bu 3
+No need for '=' to print
+.IP \(bu 3
+Easy help with: `? funcname`
+.IP \(bu 3
+Self help: `?`
+.IP \(bu 3
+Shell commands with: $ cmd (example: `$ ls`)
+.IP \(bu 3
+Print all user globals with `who()`
+.IP \(bu 3
+Import a package's symbols globally with `import(package)`
+.IP \(bu 3
+Require is overloaded to provide relative search paths:
+`require('./mylocallib/')`
+.IP \(bu 3
+[Optional] strict global namespace monitoring
+.IP \(bu 3
+[Optional] async repl
+.SH OPTIONS
+.TP
+.B
+\fB-l\fP name
+load library name
+.TP
+.B
+\fB-e\fP statement
+execute statement
+.TP
+.B
+\fB-h\fP,\fB--help\fP
+print this help
+.TP
+.B
+\fB-a\fP,\fB--async\fP
+preload async (libuv) and start async repl (BETA)
+.TP
+.B
+\fB-g\fP,\fB--globals\fP
+monitor global variables (print a warning on creation/access)
+.TP
+.B
+\fB-gg\fP,\fB--gglobals\fP
+monitor global variables (throw an error on creation/access)
+.TP
+.B
+\fB-x\fP,\fB--gfx\fP
+start gfx server and load gfx env
+.TP
+.B
+\fB-i\fP,\fB--interactive\fP
+enter the REPL after executing a script
+.SH HOMEPAGE
+http://torch.ch/
diff --git a/debian/th.1.txt b/debian/th.1.txt
new file mode 100644
index 0000000..8f384e8
--- /dev/null
+++ b/debian/th.1.txt
@@ -0,0 +1,38 @@
+NAME
+ th - Read,Eval,Print-Loop for Torch Framework
+SYNOPSIS
+ th [options] [script.lua [arguments]]
+DESCRIPTION
+ A pure Lua REPL (Read,Eval,Print-Loop) for LuaJIT, with heavy
+ support for Torch types. It uses Readline for tab completion.
+ .
+ This package also installs command line frontend `th`, which
+ comes packed with all these features:
+ .
+ * Tab-completion on nested namespaces
+ * Tab-completion on disk files (when opening a string)
+ * History
+ * Pretty print (table introspection and coloring)
+ * Auto-print after eval (can be stopped with ;)
+ * Each command is profiled, timing is reported
+ * No need for '=' to print
+ * Easy help with: `? funcname`
+ * Self help: `?`
+ * Shell commands with: $ cmd (example: `$ ls`)
+ * Print all user globals with `who()`
+ * Import a package's symbols globally with `import(package)`
+ * Require is overloaded to provide relative search paths:
+ `require('./mylocallib/')`
+ * [Optional] strict global namespace monitoring
+ * [Optional] async repl
+OPTIONS
+ -l name load library name
+ -e statement execute statement
+ -h,--help print this help
+ -a,--async preload async (libuv) and start async repl (BETA)
+ -g,--globals monitor global variables (print a warning on creation/access)
+ -gg,--gglobals monitor global variables (throw an error on creation/access)
+ -x,--gfx start gfx server and load gfx env
+ -i,--interactive enter the REPL after executing a script
+HOMEPAGE
+ http://torch.ch/
diff --git a/debian/torch-trepl.install b/debian/torch-trepl.install
new file mode 100644
index 0000000..16bd0d8
--- /dev/null
+++ b/debian/torch-trepl.install
@@ -0,0 +1,2 @@
+debian/th /usr/bin/
+th /usr/lib/torch-trepl/
diff --git a/debian/torch-trepl.manpages b/debian/torch-trepl.manpages
new file mode 100644
index 0000000..14ea37c
--- /dev/null
+++ b/debian/torch-trepl.manpages
@@ -0,0 +1 @@
+debian/th.1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lua-torch-trepl.git
More information about the debian-science-commits
mailing list