debian/0000755000000000000000000000000012202405640007161 5ustar debian/lua.pc.in0000644000000000000000000000135012202404736010677 0ustar #prefix=/usr #major_version=5.1 #version=5.1.0 #deb_host_multiarch=x86_64-linux-gnu lib_name=lua${major_version} libdir=${prefix}/lib includedir=${prefix}/include # # The following are intended to be used via "pkg-config --variable". # Install paths for Lua modules. For example, if a package wants to install # Lua source modules to the /usr/local tree, call pkg-config with # "--define-variable=prefix=/usr/local" and "--variable=INSTALL_LMOD". INSTALL_LMOD=${prefix}/share/lua/${major_version} INSTALL_CMOD=${prefix}/lib/${deb_host_multiarch}/lua/${major_version} Name: Lua Description: Lua language engine Version: ${version} Requires: Libs: -L${libdir} -l${lib_name} Libs.private: -lm -ldl Cflags: -I${includedir}/${lib_name_include} debian/examples/0000755000000000000000000000000012202404736011004 5ustar debian/examples/debian/0000755000000000000000000000000012202404736012226 5ustar debian/examples/debian/static_app/0000755000000000000000000000000012202404736014355 5ustar debian/examples/debian/static_app/README0000644000000000000000000000042412202404736015235 0ustar This is a minimal example of an application binary linked to the Lua library. The main points are to show the proper way to include a Lua header (e.g. "#include ") and how to use pkg-config to avoid hard-coding Lua header paths, library names, and dependent libraries. debian/examples/debian/static_app/app.c0000644000000000000000000000037012202404736015301 0ustar #include "lua.h" #include "lauxlib.h" #include "lualib.h" int main(void) { int result; lua_State* L = lua_open(); luaL_openlibs(L); result = luaL_dostring(L, "print 'hello from Lua'"); lua_close(L); return (result != 0); } debian/examples/debian/static_app/Makefile0000644000000000000000000000033312202404736016014 0ustar CFLAGS += -Wall LUA_CFLAGS := $(shell pkg-config lua5.1 --cflags) LUA_LINK_FLAGS := $(shell pkg-config lua5.1 --libs) all: test app: CFLAGS += $(LUA_CFLAGS) $(LUA_LINK_FLAGS) test: app ./app clean: $(RM) *.o app debian/examples/debian/README0000644000000000000000000000050412202404736013105 0ustar Index of examples: script - how to create an executable script static_app - how to build an app which uses the Lua C library binary_module - how to build static and shared binary modules To build and run all examples: $ make test For a quieter run use the "-s" option. Another useful target is "clean". debian/examples/debian/script/0000755000000000000000000000000012202404736013532 5ustar debian/examples/debian/script/README0000644000000000000000000000100012202404736014401 0ustar This is just a minimal example of an executable Lua script. Main points: * use the "env" tool to avoid hard-coding the Lua interpreter path. This allows programs calling your script to control the interpreter run via PATH. * don't use the ".lua" suffix on executable scripts. You may want to change the implementation language later (e.g. to C, LuaJIT, etc.). Your editor should be smart enough to detect a script's language by looking at the first line of the file, so that is not a valid excuse. debian/examples/debian/script/hello0000755000000000000000000000005612202404736014564 0ustar #!/usr/bin/env lua5.1 print 'hello from Lua' debian/examples/debian/script/Makefile0000644000000000000000000000004412202404736015170 0ustar all: test test: ./hello clean: ; debian/examples/debian/binary_module/0000755000000000000000000000000012202404736015057 5ustar debian/examples/debian/binary_module/README0000644000000000000000000000150412202404736015737 0ustar Binary Lua modules: best practices for Unix Key points ---------- * don't hard-code Lua header, library, or module paths in your build script * use pkg-config tool * use libtool, especially for modules to be loaded dynamically * for general modules which are to be published for use by various apps: * provide both static and dynamic library files Real example ------------ In this directory is a minimal binary Lua module called "foo" which has a single function "get_greeting" which returns a string. The purpose is to show how to build and use both dynamic and static modules in a portable way (as far as Unix goes). If you don't have libtool installed, try: $ apt-get install libtool Build and run the dynamic test with: $ make test-dynamic or the static test with: $ make test-static debian/examples/debian/binary_module/lua-foo.c0000644000000000000000000000051412202404736016565 0ustar #define LUA_LIB #include #include static int get_greeting(lua_State* L) { lua_pushstring(L, "hello from Lua"); return 1; } static const luaL_Reg funcs[] = { { "get_greeting", get_greeting }, { NULL, NULL } }; int luaopen_foo(lua_State* L) { luaL_register(L, "foo", funcs); return 1; } debian/examples/debian/binary_module/app.c0000644000000000000000000000055212202404736016005 0ustar #include #include #include int luaopen_foo(lua_State* L); int main(void) { int result; lua_State* L = lua_open(); luaL_openlibs(L); result = luaL_dostring(L, "require 'foo'"); if (result != 0) return 1; result = luaL_dostring(L, "print(foo.get_greeting())"); lua_close(L); return (result != 0); } debian/examples/debian/binary_module/Makefile0000644000000000000000000000421112202404736016515 0ustar LIBTOOL = libtool --silent --tag=CC LUA_CFLAGS := $(shell pkg-config lua5.1 --cflags) LUA_LDFLAGS := $(shell pkg-config lua5.1 --libs) LUA_LDSFLAGS := $(shell pkg-config lua5.1 --static --libs) # this is the path where you'll eventually install the module RPATH=$(shell pkg-config lua5.1 --define-variable=prefix=/usr/local \ --variable=INSTALL_CMOD) # Following is a build and use example for a binary Lua module "foo". The # implementation is in "lua-foo.c". To support dynamic loading conventions # it will need to have an open function named "luaopen_foo" which registers # the global module "foo". test: test-dynamic test-static test-static-all # compile source to make objects for static and dynamic link lua-foo.lo: lua-foo.c $(LIBTOOL) --mode=compile $(CC) -c -Wall -O2 $(LUA_CFLAGS) lua-foo.c # link objects to make static and dynamic libraries. The .so will be # left in "./.libs/". Note that the Lua library and its dependencies are # not called out on the link line since they are assumed to be part of # whatever our library is linked to. We want to avoid duplicate library # copies, which is a waste of space and can cause run-time problems. liblua-foo.la foo.so: lua-foo.lo $(LIBTOOL) --mode=link $(CC) \ -rpath $(RPATH) $(LUA_LDSFLAGS) -o liblua-foo.la lua-foo.lo ln -sf ./.libs/liblua-foo.so foo.so # If all went well, we can dynamically load the module into Lua. The # following will load the library into the interpreter and call a function. test-dynamic: foo.so lua5.1 -l foo -e 'print(foo.get_greeting())' app: app.c liblua-foo.la $(LIBTOOL) --mode=link $(CC) -Wall -O2 $(LUA_CFLAGS) \ -static $(LUA_LDFLAGS) -o app app.c liblua-foo.la app-s: app.c liblua-foo.la $(LIBTOOL) --mode=link $(CC) -Wall -O2 $(LUA_CFLAGS) \ -static -Wc,-static $(LUA_LDSFLAGS) -o app-s app.c liblua-foo.la test-static: app ./app ldd app test-static-all: app-s ./app-s ldd app-s || true # install static and dynamic libraries for module to global location install: liblua-foo.la mkdir -p $(RPATH) $(LIBTOOL) --mode=install install liblua-foo.la $(RPATH)/liblua-foo.la rm $(RPATH)/liblua-foo.la clean: $(RM) *.o *.lo *.la *.so app $(RM) -r ./.libs/ debian/examples/debian/Makefile0000644000000000000000000000021112202404736013660 0ustar SUBDIRS = script static_app binary_module .PHONY: $(SUBDIRS) %:: $(SUBDIRS) @: $(SUBDIRS):: $(MAKE) -C $(SUBDIR) $@ $(MAKECMDGOALS) debian/lua5.1.prerm0000644000000000000000000000031412202404736011240 0ustar #!/bin/sh -e case "$1" in remove) update-alternatives --remove lua-interpreter /usr/bin/lua5.1 update-alternatives --remove lua-compiler /usr/bin/luac5.1 ;; esac #DEBHELPER# debian/watch0000644000000000000000000000006712202404736010222 0ustar version=3 http://www.lua.org/ftp/lua-(5\.1.*)\.tar\.gz debian/README.Debian0000644000000000000000000001341412202404736011232 0ustar lua5.1 for Debian ================= This is packaging for Debian of the 5.1 series of the Lua programming language. For package development see . Binary package index: * lua5.1 - command line tools (i.e. interpreter and bytecode compiler) * lua5.1-doc - documentation, including manual and examples * liblua5.1-0-dev - development libraries * liblua5.1-0 - runtime libraries II. Propaganda ============== Best practices -------------- See "./examples/debian/" in the lua5.1-doc package for some tips and best practices for using the Lua library in your app, building binary modules, etc. III. Rationale ============== Packaging philosophy -------------------- The packaging philosophy adopted is to avoid changes to upstream source as much as possible. Need to maintain old Lua releases --------------------------------- While the Lua authors attempt to keep changes to the language and standard libraries backwards compatible, the C API often changes significantly between versions (e.g. from the 5.0 series to 5.1). Applications in which Lua is embedded often become bound to a certain version of Lua indefinitely. For these reasons, and in contrast to other interpreted languages which have more of a stand-alone focus, it's important to maintain old Lua library releases as long as they are in use by relevant applications. Naming convention (lua5.1 vs. lua51) ------------------------------------ The naming convention prior to the lua5.1 package, specifically the lack of delimiters in the version portion, lacked foresight. The reason is that if the version ever has more than one digit per component, the terser name will be ambiguous. Even if this will never be a problem in practice (will 61.1 clash with 6.11?), lua12.3 seems more friendly than lua123. Major and minor versions ------------------------ Looking at a full Lua version number such as "5.0.2", "5.0" is considered the major number and ".2" the minor number. The packaging scheme employed allows command line tools, modules, and libraries of multiple major Lua versions (for example, Lua 5.0 and 5.1) to exist together. At the same time, it assumes that upstream will not break Lua language compatibility in a minor release. Module paths ------------ Upstream's package.path and package.cpath consist of paths under /usr/local. Corresponding paths under /usr are required to support Lua modules which will be packaged for Debian. These have been added except in the case of /usr/lib in package.path. Debian policy is clear that architecture-independent files (i.e. .lua modules) be placed under /usr/share, while binary files (i.e. module .so's) be under /usr/lib. This implies that Lua's package.path should not contain references to /usr/lib. Since /usr/local is not under Debian management, upstream's original paths were left intact. The implication for Lua modules packaged for Debian is that the correct module paths must be used at install time. Instead of hard coding these paths, use of the "module_dir" and "binary_module_dir" info made available through pkg-config is recommended. For example, in a makefile: PREFIX = /usr MODULE_PATH = $(PREFIX)/$(shell pkg-config lua5.1 --variable=module_dir) BIN_MODULE_PATH = $(PREFIX)/$(shell pkg-config lua5.1 --variable=binary_module_dir) For those concerned about either pkg-config or these variables not being available everywhere, it is trivial to fall back to a hard coded path. Library SONAME -------------- As explained, each series of Lua (e.g. 5.0, 5.1) is treated as a completely separate library. Within a series, Libtool versioning is followed. For example, the first release of Lua 5.1 (5.1.0) will have a soname "liblua5.1.so.0". Let's say that 5.1.1 is later released, and it is binary compatible with the previous version. In that case, the soname will stay the same, and existing applications do not need to relink. Package binaries: static vs. dynamic linking -------------------------------------------- There are two executables in this source package: "lua" and "luac". Due to luac's use of internal symbols in the Lua core, at present it cannot be dynamically linked. Also, it's been reported that use of position- independent code hinders the VM's performance. For these reasons, and for consistency, both executables are statically linked. IV. For packagers ================= Package testing --------------- Final testing should be done in a clean environment (e.g. via pbuilder). Important tests: * package build * install of each binary package without the others installed * with all packages installed: * run "make" in examples/debian/ We have a package regression test which is intended to be run inside the pbuilder environment. For example (assuming pbuilder is configured to bindmount your package result directory inside the chroot): $ sudo pbuilder execute -- debian/tests/regression_test \ /var/cache/pbuilder/sid/result/lua5.1_5.1-1_i386.changes Unfinished business ------------------- TODO: make version-specific aliases for LUA_INIT, LUA_PATH, LUA_CPATH TODO: add Mike Pall's advanced readline support as a module TODO: consider using libedit in place of libreadline, as it's easier than explaining that our distribution of the "lua" interpreter is under the GPL. TODO: investigate use of versioned symbols in the .so. This will allow e.g. debuggers that can support multiple Lua versions simultaneously, and apps which assemble components using different Lua versions. (Hint: module .so's *must* be linked against the Lua library.) TODO: include soname number in source package name (on next increment). May want to split library and command line tools into separate source packages. ISSUE: want way to avoid hard-coding package and path names in lua5.1.postinst, etc. debian/liblua5.1-0-dev.install0000644000000000000000000000010212202404736013154 0ustar usr/include usr/lib/*/*.a usr/lib/*/*.so usr/lib/*/pkgconfig/*.pc debian/lua5.1.install0000644000000000000000000000003312202404736011557 0ustar usr/bin usr/share/man/man1 debian/README.source0000644000000000000000000000006712202404736011350 0ustar Please refer to /usr/share/doc/dpatch/README.source.gz debian/lua5.1-doc.doc-base0000644000000000000000000000073412202404736012341 0ustar Document: lua5.1-doc Title: Lua 5.1 Documentation Author: Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes Abstract: Lua is an extension programming language designed to support general procedural programming with data description facilities. This manual describes version 5.1 of the language and implementation including the C API. Section: Programming Format: HTML Index: /usr/share/doc/lua5.1-doc/doc/index.html Files: /usr/share/doc/lua5.1-doc/doc/* debian/rules0000755000000000000000000000446412202404736010256 0ustar #!/usr/bin/make -f LUA_V = 5.1 LUA_FULL_V = 5.1.5 SONUM = 0 LUA = lua$(LUA_V) DEB_DESTDIR := $(shell pwd)/debian/tmp/usr LIB_PACKAGE_NAME = lib$(LUA)-$(SONUM) PKG_DIR = $(DEB_DESTDIR)/lib/$(DEB_HOST_MULTIARCH)/pkgconfig PKG_CONFIG_FILE = $(PKG_DIR)/$(LUA).pc PKGPP_CONFIG_FILE = $(PKG_DIR)/$(LUA)-c++.pc DOC_DIR = debian/$(LUA)-doc/usr/share/doc/$(LUA)-doc LUA_MULTIARCH_INCLUDE = $(DEB_DESTDIR)/include/$(DEB_HOST_MULTIARCH)/ LUA_MULTIARCH = lua5.1-deb-multiarch.h ifeq (hurd,$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)) LDFLAGS=-lpthread endif %: dh $* override_dh_auto_configure: echo "#ifndef _LUA_DEB_MULTIARCH_" > src/$(LUA_MULTIARCH) echo "#define _LUA_DEB_MULTIARCH_" >> src/$(LUA_MULTIARCH) echo "#define DEB_HOST_MULTIARCH \"$(DEB_HOST_MULTIARCH)\"" >> \ src/$(LUA_MULTIARCH) echo "#endif" >> src/$(LUA_MULTIARCH) override_dh_auto_build: $(MAKE) debian_linux \ RPATH=/usr/lib/$(DEB_HOST_MULTIARCH) \ LDFLAGS="$(LDFLAGS)" override_dh_auto_install: $(MAKE) debian_install \ INSTALL_TOP=$(DEB_DESTDIR) \ INSTALL_MAN=$(DEB_DESTDIR)/share/man/man1 \ INSTALL_INC=$(DEB_DESTDIR)/include/$(LUA) override_dh_auto_clean: rm -f src/$(LUA_MULTIARCH) -$(MAKE) debian_clean override_dh_auto_test: $(MAKE) debian_test override_dh_installdocs: dh_installdocs -X/man/ -A debian/README.Debian ifneq (,$(filter lua5.1-doc, $(shell dh_listpackages))) chmod +x $(DOC_DIR)/examples/debian/script/hello mv $(DOC_DIR)/doc/readme.html $(DOC_DIR)/doc/index.html endif override_dh_install: mkdir -p $(PKG_DIR) echo "prefix=/usr" > $(PKG_CONFIG_FILE) echo "major_version=$(LUA_V)" >> $(PKG_CONFIG_FILE) echo "version=$(LUA_FULL_V)" >> $(PKG_CONFIG_FILE) echo "lib_name_include=lua$(LUA_V)" >> $(PKG_CONFIG_FILE) echo "deb_host_multiarch=$(DEB_HOST_MULTIARCH)" >> $(PKG_CONFIG_FILE) cat debian/lua.pc.in >> $(PKG_CONFIG_FILE) echo "prefix=/usr" > $(PKGPP_CONFIG_FILE) echo "major_version=$(LUA_V)" >> $(PKGPP_CONFIG_FILE) echo "version=$(LUA_FULL_V)" >> $(PKGPP_CONFIG_FILE) echo "lib_name_include=lua$(LUA_V)" >> $(PKGPP_CONFIG_FILE) echo "deb_host_multiarch=$(DEB_HOST_MULTIARCH)" >> $(PKGPP_CONFIG_FILE) cat debian/lua-c++.pc.in >> $(PKGPP_CONFIG_FILE) mkdir -p $(LUA_MULTIARCH_INCLUDE) cp src/$(LUA_MULTIARCH) $(LUA_MULTIARCH_INCLUDE) dh_install override_dh_strip: dh_strip --dbg-package=$(LIB_PACKAGE_NAME)-dbg debian/compat0000644000000000000000000000000212202404736010364 0ustar 9 debian/lua5.1.postinst0000644000000000000000000000077312202404736012007 0ustar #!/bin/sh -e case "$1" in configure) update-alternatives \ --install /usr/bin/lua lua-interpreter /usr/bin/lua5.1 110 \ --slave /usr/share/man/man1/lua.1.gz lua-manual \ /usr/share/man/man1/lua5.1.1.gz update-alternatives \ --install /usr/bin/luac lua-compiler /usr/bin/luac5.1 110 \ --slave /usr/share/man/man1/luac.1.gz lua-compiler-manual \ /usr/share/man/man1/luac5.1.1.gz ;; esac #DEBHELPER# debian/source/0000755000000000000000000000000012202404736010466 5ustar debian/source/format0000644000000000000000000000001412202404736011674 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000002176412202404736011052 0ustar lua5.1 (5.1.5-5) unstable; urgency=low * Packaging moved to git * Fix typo in doc (Closes: #676696, thanks Andrey Gursky) -- Enrico Tassi Mon, 23 Jul 2012 11:47:20 +0200 lua5.1 (5.1.5-4) unstable; urgency=low * Rename lua-deb-multiarch.h into lua5.1-deb-multiarch.h and install it in /usr/include/$DEB_HOST_MULTIARCH/ to make it available with no extra -I directive (Closes: #682234, #682183, #682299) -- Enrico Tassi Wed, 18 Jul 2012 18:43:50 +0200 lua5.1 (5.1.5-3) unstable; urgency=low * Install architecture dependent .h file in /usr/lib and fix .pc files accordingly to fix multiarch issues (Closes: #676695) -- Enrico Tassi Mon, 16 Jul 2012 12:48:01 +0200 lua5.1 (5.1.5-2) unstable; urgency=low * Put in the pkg-config .pc file -DDEB_HOST_MULTIARCH so that including lua.h (and consequently luaconf.h) works fine even if one is not using debhelpers (Closes: #671286, LP: #977813) -- Enrico Tassi Thu, 03 May 2012 14:34:16 +0200 lua5.1 (5.1.5-1) unstable; urgency=low * New upstream release (Closes: #647518) * Bump Standards-Version to 3.9.3 (no changes) * Fix paths of debug symbols setting debian/compat to 9 (Closes: #650104) * Build-depend on debhelper >= 9 * Update debian/copyright yeas to 2012 -- Enrico Tassi Mon, 02 Apr 2012 17:47:48 +0200 lua5.1 (5.1.4-12) unstable; urgency=low * Provide liblua5.1-c++.so and lua5.1-c++.pc to make it possible to C++ programs to link against Lua and use the C++ exception mecanism. (Closes: #560139) * Add lua patch 5.1.4-4 fixing all known bugs of lua 5.1.4 -- Enrico Tassi Sun, 25 Dec 2011 20:15:03 +0100 lua5.1 (5.1.4-11) unstable; urgency=low * Provides: lua, as lua50 does -- Enrico Tassi Wed, 07 Dec 2011 21:27:02 +0100 lua5.1 (5.1.4-10) unstable; urgency=low * Use -lpthread on lua5.1 only on hurd. -- Enrico Tassi Mon, 25 Jul 2011 10:15:30 +0200 lua5.1 (5.1.4-9) unstable; urgency=low * Use -lpthread on hurd also for lua5.1, and not only liblua5.1 -- Enrico Tassi Mon, 25 Jul 2011 00:24:09 +0200 lua5.1 (5.1.4-8) unstable; urgency=low * cosmetic change to rules * LDFLAGS=-lpthread on hurd, to allow to dlopen libs linked with pthreads -- Enrico Tassi Sun, 24 Jul 2011 21:59:46 +0200 lua5.1 (5.1.4-7) unstable; urgency=low * Fixed dh_installdocs target for dpkg-buildpackage -B -- Enrico Tassi Wed, 20 Jul 2011 12:42:45 +0200 lua5.1 (5.1.4-6) unstable; urgency=low * Switch to source-format 3.0 (quilt) * Switch from CDBS to dh, thanks for all the fish CDBS! * Muti-Arch compatibility * Removed .la file and updated examples accordingly * Fixed flags in .pc file (Closes: #497942) * Added upstream patch-lua-5.1.4-3 (Closes: #586552) * Better short descriptions (Closes: #597081) * Update Standards-Version to 3.9.2 (no changes) -- Enrico Tassi Tue, 19 Jul 2011 16:06:11 +0200 lua5.1 (5.1.4-5) unstable; urgency=low * Fixed #include directives and calls to luaopen_* in the examples. Thanks Mike Pall for reporting that (private mail). -- Enrico Tassi Thu, 05 Nov 2009 20:44:38 +0100 lua5.1 (5.1.4-4) unstable; urgency=low * build-depend on libreadline-dev (and not libreadline5-dev) to help the transition to libreadline6 (Closes: #551162) * added README.source pointing to default dpatch README.source * made lintian happy build-depending on debhelper >= 5 * updated standards-version to 3.8.3, no changes needed -- Enrico Tassi Fri, 16 Oct 2009 12:54:41 +0200 lua5.1 (5.1.4-3) unstable; urgency=low * added lua5.1-doc.doc-base Abstract: field. * -dbg package moved to section debug as suggested by lintian -- Enrico Tassi Tue, 21 Apr 2009 13:06:23 +0200 lua5.1 (5.1.4-2) unstable; urgency=low * upload to unstable * updated standards version to 3.8.1 * added ${misc:Depends} to make lintian happy -- Enrico Tassi Sun, 15 Mar 2009 10:14:37 +0100 lua5.1 (5.1.4-1) experimental; urgency=low * New upstream bugfix release * Bumped version-standards to 3.8.0, no changes needed -- Enrico Tassi Wed, 03 Sep 2008 18:28:39 +0200 lua5.1 (5.1.3-1) unstable; urgency=low * New upstream release (bugfix only release) * Bumped version-standards to 3.7.3, no changes needed * Fixed Vcs-* fields in control * Added Homepage: field in control and removed hand-made links to the lua website * set priority of -dbg package to extra -- Enrico Tassi Sat, 26 Jan 2008 16:28:55 +0100 lua5.1 (5.1.2-4) unstable; urgency=low * Added dependency of liblua5.1-0-dbg on liblua5.1-0 (= ${binary:Version}) as recommended by the developer reference section 6.7.9. This sould also prevent deborphan from considering it for removal (Closes: #446531). -- Enrico Tassi Sun, 14 Oct 2007 15:03:49 +0200 lua5.1 (5.1.2-3) unstable; urgency=low * Patch from upstream to fix assignement bug in lparser.c See: http://lua-users.org/lists/lua-l/2007-07/msg00617.html -- Enrico Tassi Wed, 01 Aug 2007 12:34:19 +0200 lua5.1 (5.1.2-2) unstable; urgency=low * Added -dbg package (Closes: #434815) * Made control file binNMU safe -- Enrico Tassi Fri, 27 Jul 2007 18:08:50 +0100 lua5.1 (5.1.2-1) unstable; urgency=low * New upstream release, lua5.1.2 * Remove build workaround for fixed cdbs bug -- Enrico Tassi Mon, 02 Apr 2007 20:26:49 +0200 lua5.1 (5.1.1-2) unstable; urgency=low * Added a proper watch file. * Fixed URL in copyright. -- Enrico Tassi Sun, 10 Sep 2006 14:24:26 +0200 lua5.1 (5.1.1-1) unstable; urgency=low [ John V. Belmonte ] * New upstream version, lua5.1.1 * Add README.Debian to all packages. * Small fix to example makefile. * Improvements to regression test. [ Enrico Tassi ] * Removed build-essential from Build-Depends (Closes: #366854) * Confirm Debian policy version 3.7.2. -- John V. Belmonte Tue, 13 Jun 2006 23:01:14 -0400 lua5.1 (5.1-1) unstable; urgency=low [ Enrico Tassi ] * New upstream release, lua5.1-final [ John V. Belmonte ] * Set lua and luac alternatives priority higher than other Lua packages. * Fix man page symlinks of alternatives. * Give up "liblua-?.so" variations in package.cpath. * Add package regression test. -- John V. Belmonte Sat, 18 Feb 2006 09:49:27 -0500 lua5.1 (5.0.103-1) unstable; urgency=low [ John V. Belmonte ] * New upstream release, lua5.1-rc4 [ Enrico Tassi ] * Fixed linking problem with modules. Now the command line intepreter exports all symbols so that .so modules loaded with require() do not need to be linked against the Lua library. The was causing duplicated Lua library code, resulting in wasted space and run-time problems. -- Enrico Tassi Tue, 14 Feb 2006 19:17:16 +0100 lua5.1 (5.0.102-1) unstable; urgency=low * New upstream release, lua5.1-rc3 * Change module path variables in .pc file to match upstream. -- John V. Belmonte Tue, 07 Feb 2006 21:44:08 -0500 lua5.1 (5.0.101-1) unstable; urgency=low * New upstream release, lua5.1-rc (2006-Jan-24) * Restore missing separator in package.path. * Restore package.path and package.cpath to use "lua/5.1" paths, matching upstream. * Remove /usr/lib paths from package.path to meet Debian policy. Binary files (i.e. module .so's) should be under /usr/lib. * Add "module_dir" and "binary_modlue_dir" variables to .pc file so that pkg-config can be queried to find the correct place to install Lua modules. * Add module paths rationale to Debian README. * Change co-maintainer email address. -- John V. Belmonte Sat, 28 Jan 2006 09:32:31 -0500 lua5.1 (5.0.100-1) unstable; urgency=low * New upstream release, lua5.1-rc (2006-Jan-11) * Fix build error at renaming of man files. (Closes: #349435) * Add debhelper token to maintainer scripts to make lintian happy. -- John V. Belmonte Sun, 22 Jan 2006 15:07:52 -0500 lua5.1 (5.0.99-2) unstable; urgency=low * Use examples/debian instead of examples.Debian to make dh_fixperms and lintian happy. * Work around libtool issues with --tag option. * Remove use of cdbs DEB_AUTO_UPDATE_DEBIAN_CONTROL, which is hated by ftp-masters and didn't work that well anyway. -- John V. Belmonte Mon, 2 Jan 2006 13:57:07 -0500 lua5.1 (5.0.99-1) unstable; urgency=low * Initial release, lua5.1-beta (Closes: #339935) -- John V. Belmonte Sun, 20 Nov 2005 19:55:05 -0500 debian/lua-c++.pc.in0000644000000000000000000000135412202404736011251 0ustar #prefix=/usr #major_version=5.1 #version=5.1.0 #deb_host_multiarch=x86_64-linux-gnu lib_name=lua${major_version}-c++ libdir=${prefix}/lib includedir=${prefix}/include # # The following are intended to be used via "pkg-config --variable". # Install paths for Lua modules. For example, if a package wants to install # Lua source modules to the /usr/local tree, call pkg-config with # "--define-variable=prefix=/usr/local" and "--variable=INSTALL_LMOD". INSTALL_LMOD=${prefix}/share/lua/${major_version} INSTALL_CMOD=${prefix}/lib/${deb_host_multiarch}/lua/${major_version} Name: Lua Description: Lua language engine Version: ${version} Requires: Libs: -L${libdir} -l${lib_name} Libs.private: -lm -ldl Cflags: -I${includedir}/${lib_name_include} debian/copyright0000644000000000000000000000237612202404736011131 0ustar This package was debianized by John V. Belmonte on Sun, 20 Nov 2005 19:55:05 -0500. It was downloaded from . Copyright Holder: Lua Team License: Copyright (C) 1994-2012 Lua.org, PUC-Rio. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/lua5.1-doc.docs0000644000000000000000000000004712202404736011611 0ustar README doc/ etc/ test/ debian/examples debian/control0000644000000000000000000000675012202404736010601 0ustar Source: lua5.1 Section: interpreters Priority: optional Maintainer: John V. Belmonte Uploaders: Enrico Tassi Build-Depends: debhelper (>= 9), quilt (>= 0.40), libtool, libreadline-dev Standards-Version: 3.9.3 Homepage: http://www.lua.org Vcs-Git: git://git.debian.org/git/pkg-lua/lua5.1.git Vcs-Browser: http://git.debian.org/?p=pkg-lua/lua5.1.git Package: lua5.1-doc Architecture: all Section: doc Depends: ${misc:Depends} Description: Documentation for the Lua language version 5.1 Lua is a powerful, light-weight programming language designed for extending applications. The language engine is accessible as a library, having a C API which allows the application to exchange data with Lua programs and also to extend Lua with C functions. Lua is also used as a general-purpose, stand-alone language through the simple command line interpreter provided. . This package contains the official manual covering the Lua language and C API, examples, etc. Package: lua5.1 Architecture: any Multi-Arch: foreign Provides: lua Depends: ${shlibs:Depends}, ${misc:Depends} Description: Simple, extensible, embeddable programming language Lua is a powerful, light-weight programming language designed for extending applications. The language engine is accessible as a library, having a C API which allows the application to exchange data with Lua programs and also to extend Lua with C functions. Lua is also used as a general-purpose, stand-alone language through the simple command line interpreter provided. . This package contains the Lua command line interpreter and bytecode compiler. Install it if you are developing or using Lua scripts. Package: liblua5.1-0-dev Provides: liblua5.1-dev Conflicts: liblua5.1-dev Architecture: any Multi-Arch: same Depends: liblua5.1-0 (= ${binary:Version}), libc6-dev|libc-dev, libreadline-dev, ${misc:Depends} Recommends: pkg-config, libtool Section: libdevel Description: Development files for the Lua language version 5.1 Lua is a powerful, light-weight programming language designed for extending applications. The language engine is accessible as a library, having a C API which allows the application to exchange data with Lua programs and also to extend Lua with C functions. Lua is also used as a general-purpose, stand-alone language through the simple command line interpreter provided. . This package contains developer resources for using the Lua library. Install it if you are developing programs which use the Lua C API, both in C or C++. Package: liblua5.1-0 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Section: libs Description: Shared library for the Lua interpreter version 5.1 Lua is a powerful, light-weight programming language designed for extending applications. The language engine is accessible as a library, having a C API which allows the application to exchange data with Lua programs and also to extend Lua with C functions. Lua is also used as a general-purpose, stand-alone language through the simple command line interpreter provided. . This package contains runtime libraries. You shouldn't need to install it explicitly. Package: liblua5.1-0-dbg Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, liblua5.1-0 (= ${binary:Version}), ${misc:Depends} Section: debug Priority: extra Description: Debug symbols for the Lua shared library interpreter This package contains the debugging symbols for liblua5.1 and lua5.1 debian/patches/0000755000000000000000000000000012202404736010615 5ustar debian/patches/series0000644000000000000000000000006412202404736012032 0ustar debian_make.patch module_paths.patch extern_C.patch debian/patches/debian_make.patch0000644000000000000000000000662512202404736014066 0ustar Author: John V. Belmonte Description: Add support for Debian package to makefiles. Index: lua5.1-5.1.5/Makefile =================================================================== --- lua5.1-5.1.5.orig/Makefile 2012-02-10 10:50:23.000000000 +0100 +++ lua5.1-5.1.5/Makefile 2012-07-16 12:25:26.000000000 +0200 @@ -12,7 +12,7 @@ INSTALL_TOP= /usr/local INSTALL_BIN= $(INSTALL_TOP)/bin INSTALL_INC= $(INSTALL_TOP)/include -INSTALL_LIB= $(INSTALL_TOP)/lib +INSTALL_LIB= $(INSTALL_TOP)/lib/$(DEB_HOST_MULTIARCH) INSTALL_MAN= $(INSTALL_TOP)/man/man1 # # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with @@ -126,3 +126,30 @@ .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho # (end of Makefile) + +# Use libtool for binary installs, etc. + +export V +export LIBTOOL = libtool --quiet --tag=CC +export LIBTOOLPP = libtool --quiet --tag=CXX +# See libtool manual about how to set this +export LIB_VERSION = 0:0:0 + +debian_clean: + cd src; $(MAKE) $@ + +debian_test: debian_linux + src/lua$(V) test/hello.lua + +debian_install: debian_linux + cd src; mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) + cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$(V) luac$(V) $(INSTALL_BIN) + cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$(V).la $(INSTALL_LIB) + cd src; $(LIBTOOLPP) --mode=install $(INSTALL_DATA) liblua$(V)-c++.la $(INSTALL_LIB) + $(foreach NAME,$(TO_MAN),$(INSTALL_DATA) doc/$(NAME) $(INSTALL_MAN)/$(basename $(NAME))$(V)$(suffix $(NAME));) + +# ISSUE: MYCFLAGS not honored in the case of a CFLAGS override +debian_linux: + cd src; $(MAKE) debian_all CFLAGS+=-DLUA_USE_LINUX \ + LIB_LIBS="-lm -ldl" LUA_LIBS="-lreadline" LDFLAGS="$(LDFLAGS)" Index: lua5.1-5.1.5/src/Makefile =================================================================== --- lua5.1-5.1.5.orig/src/Makefile 2012-02-13 21:41:22.000000000 +0100 +++ lua5.1-5.1.5/src/Makefile 2012-07-16 12:24:40.000000000 +0200 @@ -180,3 +180,36 @@ ltm.h lzio.h lmem.h lopcodes.h lundump.h # (end of Makefile) + +# The following rules use libtool for compiling and linking in order to +# provide shared library support. While we are at it, our desired version +# suffixes are added to the targets, preventing conflicts with rules in +# the upstream makefile. + +LIB_NAME = liblua$(V).la +LIBPP_NAME = liblua$(V)-c++.la +LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) +LIBPP_OBJS = $(CORE_O:%.o=%-c++.lo) $(LIB_O:%.o=%-c++.lo) + +%-c++.lo %-c++.o: %.c + $(LIBTOOLPP) --mode=compile $(CXX) -o $*-c++.lo -c $(CPPFLAGS) $(CFLAGS) $< +%.lo %.o: %.c + $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $< + +$(LIB_NAME) $(LIB_NAME:.la=.a): $(LIB_OBJS) + $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \ + -rpath $(RPATH) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) +$(LIBPP_NAME) $(LIBPP_NAME:.la=.a): $(LIBPP_OBJS) + $(LIBTOOLPP) --mode=link $(CXX) -version-info $(LIB_VERSION) \ + -rpath $(RPATH) -o $(LIBPP_NAME) $(LIBPP_OBJS) $(LIB_LIBS) + +lua$(V): $(LUA_O) $(LIB_NAME) + $(LIBTOOL) --mode=link $(CC) -static -Wl,-E -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS) $(LDFLAGS) + +luac$(V): $(LUAC_O) $(LIB_NAME) + $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(LIB_NAME) + +debian_clean: + $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$(V) luac$(V) + +debian_all: $(LIB_NAME) $(LIBPP_NAME) lua$(V) luac$(V) debian/patches/module_paths.patch0000644000000000000000000000230612202404736014323 0ustar Author: John V. Belmonte Description: Set Lua's default PATH and CPATH. Index: lua5.1-5.1.5/src/luaconf.h =================================================================== --- lua5.1-5.1.5.orig/src/luaconf.h 2008-02-11 17:25:08.000000000 +0100 +++ lua5.1-5.1.5/src/luaconf.h 2012-07-16 12:23:12.000000000 +0200 @@ -94,14 +94,21 @@ ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" #else +/* This defines DEB_HOST_MULTIARCH */ +#include "lua5.1-deb-multiarch.h" #define LUA_ROOT "/usr/local/" +#define LUA_ROOT2 "/usr/" #define LUA_LDIR LUA_ROOT "share/lua/5.1/" +#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/" #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" +#define LUA_CDIR2 LUA_ROOT2 "lib/" DEB_HOST_MULTIARCH "/lua/5.1/" +#define LUA_CDIR3 LUA_ROOT2 "lib/lua/5.1/" #define LUA_PATH_DEFAULT \ "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" + LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ + LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua" #define LUA_CPATH_DEFAULT \ - "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" + "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR3"?.so;" LUA_CDIR"loadall.so" #endif debian/patches/extern_C.patch0000644000000000000000000000070412202404736013406 0ustar Author: Enrico Tassi Description: avoid name mangling while building with C++ Index: lua5.1-5.1.4/src/luaconf.h =================================================================== --- lua5.1-5.1.4.orig/src/luaconf.h 2011-12-24 15:59:53.000000000 +0100 +++ lua5.1-5.1.4/src/luaconf.h 2011-12-24 16:01:42.000000000 +0100 @@ -166,7 +166,11 @@ #else +#ifdef __cplusplus +#define LUA_API extern "C" +#else #define LUA_API extern +#endif #endif debian/tests/0000755000000000000000000000000012202404736010330 5ustar debian/tests/regression_test0000755000000000000000000000451212202404736013477 0ustar #!/bin/bash -e # # Regression test for Lua packages. # # Synopsis: # $ regression_test build-area/lua5.1_5.1-1_i386.changes # # As new packaging bugs are discovered, try to add a corresponding regression # test to this script. # # This script requires root privilege. It's intended to be run in a # base chroot environment (e.g. via "pbuilder execute"). # if (($# != 1)); then echo "usage: $(basename $0) CHANGES_FILE" exit 1 fi 1>&2 trap "echo 'Regression test FAILED.' 1>&2" EXIT CHANGES="$1" PACKAGE_DIR=$(dirname $CHANGES) PACKAGE_NAME=$(grep ^Source: $CHANGES | cut -d' ' -f2) PACKAGE_V=$(grep ^Version: $CHANGES | cut -d' ' -f2) DEBS=$(grep '\.deb$' $CHANGES | cut -d' ' -f6 | xargs -iXX echo ${PACKAGE_DIR}/XX) PACKAGES=$(grep '\.deb$' $CHANGES | cut -d' ' -f6 | cut -d_ -f1) LUA_V=$(cut -d'-' -f1 <<<$PACKAGE_V) LUA_MAJOR_V=$(cut -d'.' -f-2 <<<$LUA_V) SRC_BASE=${PACKAGE_DIR}/${PACKAGE_NAME}_${PACKAGE_V} DSC_FILE=${SRC_BASE}.dsc DIFF_FILE=${SRC_BASE}.diff.gz APT_INSTALL="apt-get install -qq --force-yes" function msg { echo "*** $@" } msg "Starting tests." # Since we are installing our .deb's directly, we have to manually install # dependencies. It would be better to have our packages available through # an apt source. msg "(Installing dependencies...)" $APT_INSTALL libreadline-dev libncurses5-dev msg "Package install..." dpkg -i $DEBS msg "(Installing support packages...)" # install packages for other tests $APT_INSTALL pkg-config libtool lintian patchutils msg "Lintian test..." lintian -i --allow-root $DSC_FILE $DEBS msg "pkg-config test..." pkg-config --exists $PACKAGE_NAME [[ "$(pkg-config $PACKAGE_NAME --modversion)" == "$LUA_V" ]] || exit 1 [[ "$(pkg-config $PACKAGE_NAME --variable major_version)" == \ "$LUA_MAJOR_V" ]] || exit 1 msg "Examples test..." cd /usr/share/doc/${PACKAGE_NAME}-doc/examples/debian make -s cd - msg "Man page test..." man lua luac lua${LUA_MAJOR_V} luac${LUA_MAJOR_V} > /dev/null msg "Doc test..." # ensure every package has README.Debian for name in $PACKAGES; do [[ -f /usr/share/doc/$name/README.Debian.gz ]] || exit 1 done msg "Diff test..." if BAD_DIFFS=$(zcat $DIFF_FILE | lsdiff --strip=1 | grep -v ^debian/); then echo "ERROR: diff contains items outside of debian directory:" echo "$BAD_DIFFS" exit 1 fi 1>&2 msg "All tests passed." trap EXIT debian/liblua5.1-0.install0000644000000000000000000000002112202404736012400 0ustar usr/lib/*/*.so.*