lua5.1-policy-33/0000755000000000000000000000000011612051527010471 5ustar lua5.1-policy-33/templates/0000755000000000000000000000000011612051527012467 5ustar lua5.1-policy-33/templates/Makefile.Debian.conf.sample0000644000000000000000000000165411277345450017532 0ustar ### $Id: Makefile.Debian.conf.sample 1398 2009-11-13 21:10:12Z gareuselesinge $ ### mandatory fields PKG_NAME= ### things relative to the C library part CLIB_CFLAGS= CLIB_LDFLAGS= CLIB_LDFLAGS_STATIC= CLIB_OBJS= VERSION_INFO=0:0:0 LUA_MODNAME_CPART= ### things relative to the lua library part LUA_HEADER= LUA_SOURCES= LUA_MODNAME= LUA_TEST= ### this part is relative to pkg-config PKG_VERSION=$(shell dpkg-parsechangelog|grep ^Ver|cut -d ' ' -f 2|cut -d '-' -f 1) PKG_LIBS_PRIVATE= PKG_URL= PKG_REQUIRES= PKG_CONFLICTS= ### this part is relative to debian libs naming policy DEB_EXTRA_DASH= ### In addition, to gather flexibility, you can set these hooks ### (called in this order) pre-all-hook:: post-all-hook:: pre-test-hook:: pre-lua-dynamic-test-hook:: pre-dynamic-link-hook:: pre-app-dynamic-test-hook:: pre-static-link-hook:: pre-app-static-test-hook:: pre-install-hook:: post-install-hook:: pre-clean-hook:: post-clean-hook:: lua5.1-policy-33/templates/app.c.conf.in0000644000000000000000000000045610771205137014754 0ustar // $Id: app.c.conf.in 902 2008-03-22 13:32:17Z gareuselesinge $ #include "@@LUA_HEADER@@" static void app_open(lua_State* L){ lua_getglobal(L,"package"); lua_getfield(L,-1,"preload"); lua_pushcfunction(L,luaopen_@@LUA_MODNAME_CPART_UNDERSCORE@@); lua_setfield(L,-2,"@@LUA_MODNAME_CPART@@"); } lua5.1-policy-33/templates/pkg-config.pc.in0000644000000000000000000000073211530172054015444 0ustar lua=@@PKG_LUA@@ version=@@PKG_VERSION@@ lib_name=@@PKG_NAME@@ libs_private=@@PKG_LIBS_PRIVATE@@ url=@@PKG_URL@@ requires=@@PKG_REQUIRES@@ conflicts=@@PKG_CONFLICTS@@ prefix=/usr libdir=${prefix}/lib includedir=${prefix}/include/${lua} Name: Lua ${lib_name} Description: Lua ${lib_name} engine Version: ${version} URL: ${url} Requires: ${requires} lua5.1 Conflicts: ${conflicts} Libs: -L${libdir} -l${lua}-${lib_name} Libs.private: ${libs_private} Cflags: -I${includedir} lua5.1-policy-33/templates/Makefile.Debian.multiple0000644000000000000000000000043711231277116017147 0ustar MODULES=$(wildcard debian/*Makefile.Debian.conf) LUA_SINGLE_MAKEFILE=/usr/share/lua5.1-policy-dev/Makefile.Debian.single .PHONY: all clean test install all clean test install: for X in $(MODULES); do\ make -f $(LUA_SINGLE_MAKEFILE) $@ \ CONFIGURATION_FILE=$$X || exit 1;\ done lua5.1-policy-33/templates/lua.mk0000644000000000000000000000307111243266035013604 0ustar # # Description: CDBS class for Lua related packages # # Copyright © 2009 Enrico Tassi # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. _cdbs_scripts_path ?= /usr/lib/cdbs _cdbs_rules_path ?= /usr/share/cdbs/1/rules _cdbs_class_path ?= /usr/share/cdbs/1/class _ocaml_share_path ?= /usr/share/ocaml ifndef _cdbs_class_lua _cdbs_class_lua = 1 include $(_cdbs_class_path)/makefile.mk include $(_cdbs_rules_path)/debhelper.mk DEB_DESTDIR=$(shell pwd)/debian/tmp LUA_POLICY_PATH := /usr/share/lua5.1-policy-dev/ LUA_POLICY_MAKEFILE := $(LUA_POLICY_PATH)/Makefile.Debian.multiple DEB_MAKE_BUILD_TARGET := all -f $(LUA_POLICY_MAKEFILE) DEB_MAKE_CHECK_TARGET := test -f $(LUA_POLICY_MAKEFILE) DEB_MAKE_CLEAN_TARGET := clean -f $(LUA_POLICY_MAKEFILE) DEB_MAKE_INSTALL_TARGET := install -f $(LUA_POLICY_MAKEFILE) DESTDIR=$(DEB_DESTDIR) DEB_DH_INSTALL_SOURCEDIR := $(DEB_DESTDIR) endif lua5.1-policy-33/templates/app.c0000644000000000000000000000246611561765366013443 0ustar // $Id: app.c 1547 2011-05-09 13:24:05Z gareuselesinge $ #include #include #include #include // this should include all the needed libraries and // define // static void app_open(lua_State* L) #include "app.c.conf" int main(int argn,char** argv){ int rc; int i; // create a lua VM lua_State* L = lua_open(); if (L == NULL) { fprintf(stderr,"Unable to allocate a lua_State"); return 1; } // load stdlib lua_gc(L, LUA_GCSTOP, 0); /* stop collector during initialization */ luaL_openlibs(L); /* open libraries */ lua_gc(L, LUA_GCRESTART, 0); // here the specific luaopen_MODULENAME app_open(L); // LOAD rc = luaL_loadfile(L,argv[1]); // check for errors if (rc != 0){ const char* error = NULL; error = lua_tostring(L,-1); fprintf(stderr,"app.c: %s\n",error); return 1; } // RUN! lua_newtable(L); for(i=1;i /usr/lib/lua/5.1/sql/mysql LUA_MODNAME_PATH=$(subst .,/,$(LUA_MODNAME_CPART)) # luaopen_luasql_mysql(lua_State* L) LUA_MODNAME_CPART_UNDERSCORE=$(subst .,_,$(LUA_MODNAME_CPART)) # depending on the nesting, a '../' for every level LUA_MODNAME_DOTS=$(shell echo $(LUA_MODNAME_CPART) | sed 's/[^\.]//g' | sed 's/\./..\//g') C_TEST_FILE_STAMP=ctestfile-stamp.$(PKG_NAME) DEB_INST_LIB=debian/$(DEB_PKG_LIB).install DEB_INST_DEV=debian/$(DEB_PKG_DEV).install DEB_INSTALLS=$(DEB_INST_LIB) $(DEB_INST_DEV) # debian .install generation DEB_PKGCONF_INST=usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/$(PKG_CONF_NAME) DEB_PKGCONF_INST_REX=\/?usr\/lib\/.*\/pkgconfig\/ DEB_HEADERS_INST=usr/include/$(LUA)/$(shell basename $(LUA_HEADER)) DEB_HEADERS_INST_REX=\/?usr\/include\/$(LUA)\/ DEB_LUA_INST=usr/share/lua/$(LUA_VERSION)/* DEB_LUA_INST_REX=\/?usr\/share\/lua\/$(LUA_VERSION)\/ DEB_LIBSO_INST=usr/lib/$(DEB_HOST_MULTIARCH)/$(LIBNAME).so DEB_LIBSO_INST_REX=\/?usr\/lib\/.*\.so DEB_LIBA_INST=usr/lib/$(DEB_HOST_MULTIARCH)/$(LIBNAME).a DEB_LIBA_INST_REX=\/?usr\/lib\/$(DEB_HOST_MULTIARCH)\/.*\.a DEB_LIBSOABI_INST=usr/lib/$(DEB_HOST_MULTIARCH)/$(LIBNAME).so.* DEB_LIBSOABI_INST_REX=\/?usr\/lib\/$(DEB_HOST_MULTIARCH)\/.*\.so\..* DEB_LIBSOM_INST=usr/lib/$(DEB_HOST_MULTIARCH)/lua/$(LUA_VERSION)/$(LUA_MODNAME_PATH).so DEB_LIBSOM_INST_REX=\/?usr\/lib\/$(DEB_HOST_MULTIARCH)\/lua\/$(LUA_VERSION)\/.*\.so # common utilities GREP=egrep ECHO=echo # to help crosscompiling DEB_BUILD_ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH) DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH) ### }}} .PHONY: all clean test install # ---------------------- Here starts the Makefile ------------------------------ # {{{ entrypoints ifeq "$(CLIB_OBJS)" "" all: pre-all-hook $(DEB_INSTALLS) post-all-hook test: pre-test-hook test-lua-dynamic install: pre-install-hook installcommon post-install-hook else all: pre-all-hook $(LIBNAME).la $(PKG_CONF_NAME) $(DEB_INSTALLS) post-all-hook test: $(LIBNAME).la pre-test-hook test-lua-dynamic test-app-dynamic test-app-static install: pre-install-hook installcommon installso post-install-hook endif clean: pre-clean-hook clean1 post-clean-hook # }}} # ---------------------------- Testing ----------------------------------------- # {{{ test the module, from lua and from a dynamically/statically linked C app test-lua-dynamic-fake: @echo "********************** lua dynamic **************************" @echo SKIPPED! @echo "*************************************************************" test-app-static-fake: @echo "*********************** app static **************************" @echo SKIPPED! @echo "*************************************************************" test-app-dynamic-test: @echo "********************** app dynamic **************************" @echo SKIPPED! @echo "*************************************************************" test-lua-dynamic-real: @echo "********************** lua dynamic **************************" HOME=$(shell pwd)/debian LUA_INIT= SEGFAULT_SIGNALS=all catchsegv \ $(LUA) -l $(LUA_MODNAME) $(LUA_TEST) @echo "*************************************************************" test-app-static-real: @echo "*********************** app static **************************" ldd ./app HOME=$(shell pwd)/debian LUA_INIT= SEGFAULT_SIGNALS=all \ catchsegv ./app $(LUA_TEST) @echo "*************************************************************" test-app-dynamic-real: @echo "********************** app dynamic **************************" $(LBTL) --mode=execute -dlopen $(LIBNAME).la ldd ./.libs/app HOME=$(shell pwd)/debian LUA_INIT= SEGFAULT_SIGNALS=all \ $(LBTL) --mode=execute -dlopen $(LIBNAME).la \ catchsegv ./app $(LUA_TEST) @echo "*************************************************************" ifeq "$(LUA_TEST)" "" test-lua-dynamic: pre-lua-dynamic-test-hook test-lua-dynamic-fake test-app-static: static-stamp.$(PKG_NAME) pre-app-static-test-hook test-app-static-fake test-app-dynamic: dynamic-stamp.$(PKG_NAME) pre-app-dynamic-test-hook test-app-dynamic-test else ifneq "$(DEB_HOST_ARCH)" "$(DEB_BUILD_ARCH)" test-lua-dynamic: pre-lua-dynamic-test-hook test-lua-dynamic-fake test-app-static: static-stamp.$(PKG_NAME) pre-app-static-test-hook test-app-static-fake test-app-dynamic: dynamic-stamp.$(PKG_NAME) pre-app-dynamic-test-hook test-app-dynamic-test else test-lua-dynamic: pre-lua-dynamic-test-hook test-lua-dynamic-real test-app-static: static-stamp.$(PKG_NAME) pre-app-static-test-hook test-app-static-real test-app-dynamic: dynamic-stamp.$(PKG_NAME) pre-app-dynamic-test-hook test-app-dynamic-real endif endif # }}} # ------------------------- Installation --------------------------------------- # {{{ install static and dynamic libraries for module to global location installso: $(LIBNAME).la $(PKG_CONF_NAME) $(DEB_INSTALLS) $(LUA_HEADER) # .so installation # $(LUA_MODNAME) installation (symlink to .so) # FIXME ../../ should be mkdir -p $(LUA_CPATH) mkdir -p $(LUA_LPATH) $(LBTL) --mode=install install $(LIBNAME).la \ $(LUA_LPATH)/$(LIBNAME).la $(LBTL) --finish $(LUA_LPATH) cd $(LUA_CPATH); \ mkdir -p $(dir $(LUA_MODNAME_PATH));\ ln -s $(LUA_MODNAME_DOTS)../../$(REALSO) $(LUA_MODNAME_PATH).so # .install for X in $(DEB_INST_LIB) $(DEB_INST_DEV); do\ if [ -e $$X -a ! -e install.in-stamp.$(PKG_NAME).`basename $$X | sed 's?.install$$??'` ]; then\ echo;\ echo -e "\t\t*** WARNING: user provided $$X found and ignored";\ echo -e "\t\t*** WARNING: please use an .install.in";\ echo;\ cp $$X $$X.backup;\ fi;\ done $(GREP) '$(DEB_LIBSOM_INST_REX)' $(DEB_INST_LIB) || \ $(ECHO) "$(DEB_LIBSOM_INST)" >> $(DEB_INST_LIB) $(GREP) '$(DEB_LIBSOABI_INST_REX)' $(DEB_INST_LIB) || \ $(ECHO) "$(DEB_LIBSOABI_INST)" >> $(DEB_INST_LIB) $(GREP) '$(DEB_LIBSO_INST_REX)' $(DEB_INST_DEV) || \ $(ECHO) "$(DEB_LIBSO_INST)" >> $(DEB_INST_DEV) $(GREP) '$(DEB_LIBA_INST_REX)' $(DEB_INST_DEV) || \ $(ECHO) "$(DEB_LIBA_INST)" >> $(DEB_INST_DEV) # .pc mkdir -p $(LUA_LPATH)/pkgconfig/ $(LBTL) --mode=install install -m 0644 $(PKG_CONF_NAME) \ $(LUA_LPATH)/pkgconfig/ $(GREP) '$(DEB_PKGCONF_INST_REX)' $(DEB_INST_DEV) || \ $(ECHO) "$(DEB_PKGCONF_INST)" >> $(DEB_INST_DEV) # .h if [ ! -z "$(LUA_HEADER)" ]; then\ mkdir -p $(LUA_HPATH);\ $(LBTL) --mode=install install -m 0644 \ $(LUA_HEADER) $(LUA_HPATH)/;\ $(GREP) '$(DEB_HEADERS_INST_REX)' $(DEB_INST_DEV) || \ $(ECHO) "$(DEB_HEADERS_INST)" >> $(DEB_INST_DEV);\ fi installcommon: $(DEB_INSTALLS) if [ ! -z "$(LUA_SOURCES)" ]; then\ mkdir -p $(LUA_SPATH);\ cp -r $(LUA_SOURCES) $(LUA_SPATH)/;\ $(GREP) '$(DEB_LUA_INST_REX)' $(DEB_INST_LIB) || \ $(ECHO) "$(DEB_LUA_INST)" >> $(DEB_INST_LIB);\ fi # }}} # ------------------------- C compilation -------------------------------------- # {{{ compilation rules: .lo .la app %.lo: %.c $(LBTL) --mode=compile $(CC) -c $(GCC_FLAGS) -o $@ $< $(C_TEST_FILE_STAMP):$(C_TEST_FILE).conf.in $(LUA_HEADER) cp $< `basename $(C_TEST_FILE).conf` sed -i 's?@@LUA_HEADER@@?$(LUA_HEADER)?' `basename $(C_TEST_FILE).conf` sed -i \ 's?@@LUA_MODNAME_CPART_UNDERSCORE@@?$(LUA_MODNAME_CPART_UNDERSCORE)?'\ `basename $(C_TEST_FILE).conf` sed -i 's?@@LUA_MODNAME_CPART@@?$(LUA_MODNAME_CPART)?' \ `basename $(C_TEST_FILE).conf` touch $(C_TEST_FILE_STAMP) $(LIBNAME).la $(LUA_MODNAME_PATH).so: $(CLIB_OBJS) $(LBTL) --mode=link $(CC) \ -rpath $(LUA_LPATH) -o $(LIBNAME).la \ -version-info $(VERSION_INFO) \ -Wl,--no-add-needed \ $(CLIB_OBJS) $(CLIB_LDFLAGS) mkdir -p $(dir $(LUA_MODNAME_PATH)) ln -sf $(LUA_MODNAME_DOTS)./.libs/$(REALSO) $(LUA_MODNAME_PATH).so app static-stamp.$(PKG_NAME): $(C_TEST_FILE_STAMP) $(LIBNAME).la pre-static-link-hook rm -f dynamic-stamp.$(PKG_NAME) $(LBTL) --mode=link $(CC) -Wall -O2 $(GCC_FLAGS) -Wl,--no-add-needed \ -static -o app -I . \ $(C_TEST_FILE) $(LIBNAME).la \ $(CLIB_LDFLAGS_STATIC) $(LUA_LBTL_S) touch static-stamp.$(PKG_NAME) ./.libs/app dynamic-stamp.$(PKG_NAME): $(C_TEST_FILE_STAMP) $(LIBNAME).la pre-dynamic-link-hook rm -f static-stamp.$(PKG_NAME) $(LBTL) --mode=link $(CC) -Wall -O2 $(GCC_FLAGS) -Wl,--no-add-needed \ -o app -I . \ $(C_TEST_FILE) $(LIBNAME).la \ $(CLIB_LDFLAGS) $(LUA_LBTL_D) touch dynamic-stamp.$(PKG_NAME) # }}} # ------------------------- .in processing ------------------------------------- # {{{ pkgconfig, .install and (evental) .h generation $(PKG_CONF_NAME): $(LUA_POLICY_PATH)pkg-config.pc.in cat $< | \ sed 's|@@PKG_VERSION@@|$(PKG_VERSION)|' | \ sed 's|@@PKG_NAME@@|$(PKG_NAME_DASH)|' | \ sed 's|@@PKG_LUA@@|$(LUA)|' | \ sed 's|@@PKG_LIBS_PRIVATE@@|$(PKG_LIBS_PRIVATE)|' | \ sed 's|@@PKG_URL@@|$(PKG_URL)|' | \ sed 's|@@PKG_REQUIRES@@|$(PKG_REQUIRES)|' | \ sed 's|@@PKG_CONFLICTS@@|$(PKG_CONFLICTS)|' \ > $@ debian/%.install: if [ -e $@.in ]; then\ cat $@.in | sed 's|@@LUA_VERSION@@|$(LUA_VERSION)|' | \ sed 's|@@DEB_HOST_MULTIARCH@@|$(DEB_HOST_MULTIARCH)|' > $@;\ else\ touch $@;\ fi;\ touch install.in-stamp.$(PKG_NAME).$* $(LUA_HEADER): echo "/* This file has been automatically generated by lua5.1-policy-dev */" > $@ echo >> $@ echo "extern int luaopen_$(LUA_MODNAME_CPART_UNDERSCORE)(lua_State*);" >> $@ echo >> $@ echo "/* eof */" >> $@ touch header-stamp.$(PKG_NAME) # }}} # ------------------------- Not interesting stuff ------------------------------ # {{{ hooks in CDBS style pre-all-hook :: @echo pre-all-hook post-all-hook:: @echo post-all-hook pre-test-hook :: @echo pre-test-hook pre-install-hook :: @echo pre-install-hook post-install-hook :: @echo post-install-hook pre-static-link-hook :: @echo pre-static-link-hook pre-dynamic-link-hook:: @echo pre-dynamic-link-hook pre-lua-dynamic-test-hook:: @echo pre-lua-dynamic-test-hook pre-app-static-test-hook :: @echo pre-app-static-test-hook pre-app-dynamic-test-hook :: @echo pre-app-dynamic-test-hook pre-clean-hook:: @echo pre-clean-hook post-clean-hook:: @echo post-clean-hook # }}} # {{{ some trivial rules clean1: $(RM) -f $(CLIB_OBJS:%.lo=%.o) $(CLIB_OBJS) $(LIBNAME).la app rm -f $(LUA_MODNAME_PATH).so rmdir $(dir $(LUA_MODNAME_PATH)) || true $(RM) -rf $(foreach x,$(CLIB_OBJS),$(dir $(x)).libs/) .libs/ $(RM) -rf $(C_TEST_FILE).conf $(PKG_CONF_NAME) if [ -e header-stamp.$(PKG_NAME) ]; then $(RM) -f $(LUA_HEADER); fi if [ -n "`ls debian/*.install.backup 2>/dev/null`" ]; then\ for X in debian/*.install.backup; do\ mv $$X debian/`basename $$X .backup`;\ done;\ fi for X in install.in-stamp.$(PKG_NAME).*; do\ if [ -e $$X ]; then\ $(RM) -f $${X#install.in-stamp.$(PKG_NAME).};\ fi;\ done $(RM) -f static-stamp.$(PKG_NAME) dynamic-stamp.$(PKG_NAME) $(RM) -f header-stamp.$(PKG_NAME) install.in-stamp.$(PKG_NAME).* $(RM) -f $(C_TEST_FILE_STAMP) # }}} # eof lua5.1-policy-33/README0000644000000000000000000000110611231364757011360 0ustar lua5.1-policy ============= This debian packages contains the debian policy for libraries related to the lua5.1 scripting language. The `lua5.1-policy` package contains the policy, in txt and html format. The `lua5.1-policy-dev` package is meant to ease the packager life. It can be declared in the the build-depends field of a lua library package and It provides the following utility and CDBS class: - `lua5.1-policy-create-svnbuildpackage-layout` Should be used to initialise an svn repository for a new package. - `lua.mk` to be included in your rules file lua5.1-policy-33/doc/0000755000000000000000000000000011612051527011236 5ustar lua5.1-policy-33/doc/html/0000755000000000000000000000000011612051527012202 5ustar lua5.1-policy-33/doc/html/style.css0000644000000000000000000000117410771205070014056 0ustar body { background-color: #FFFFf2; font-family: sans-serif; } h1 { text-align: center; } h2 { border-bottom-style: solid; border-bottom-width: 2px; border-bottom-color: #AAAAAA; } a:hover { color: #ffffff; background-color: #1030f0; text-decoration: none; } a.nohover:hover { background-color: transparent; } a code { font-family: inherit; } blockquote p { margin:0pt; padding-left:0pt; } pre, blockquote { display: block; padding-left:1em; padding-right:1em; padding-top:1em; padding-bottom:1em; margin-left:4em; margin-right:4em; border-style: solid; border-width: 1px; background-color: #DDDDDD; } lua5.1-policy-33/doc/get_used_vars.lua0000644000000000000000000000023710771205070014574 0ustar f = io.open("policy.txt") data = f:read("*all") vars = {} string.gsub(data,"{[A-Z_]*}",function (s) vars[s] = true end) for k,v in pairs(vars) do print(k) end lua5.1-policy-33/doc/policy.txt0000644000000000000000000003735011611374335013312 0ustar Debian Lua policy ============================== Index ----- * [Conventions](#ch-conventions) * [Rationale](#ch-rationale) * [Packages Contents](#ch-pkgcontents) * [Run time package: `liblua{LUA_VERSION}-{PKG_NAME}{CABI}` ](#sec-runtime) * [Development package: `liblua{LUA_VERSION}-{PKG_NAME}-dev` ](#sec-devel) * [Packages Contents (an example)](#sec-pkgconsample) * [Creating a package in a quick and clean way](#ch-quickandclean) * [The `lua5.1-policy-dev` package](#sec-pkgpolicydev) * [Writing a `debian/Makefile.Debian.conf` file](#sec-makefileconf) * [The `rules` file](#sec-rules) * [No `.install` files](#sec-install) * [Multiple packages from the same source](#sec-multipkg) * [Automatically testing your package](#sec-autotest) * [Notes on undefined symbols and packages dependencies](#ch-notesundef) * [Notes on source package names](#ch-notessource) Conventions ----------- In the following we will write `{VARIABLE}` to mean a schema of file name. Used variable names follow: - `{LUA_VERSION}` The lua version, now `5.1` (that is `5.1.1` without the minor version number). - `{PKG_NAME}` The usual name for that library, e.g. `expat`. - `{ABI}` The ABI version info, e.g. `0.0.0` - `{CABI}` The ABI first number (called CURRENT in libtool terminology) - `{LUA_MODNAME}` The string used to `require` the module, e.g. `lxp` Rationale --------- For every library two packages will be available, one containing only the minimum needed to run `require "{LUA_MODNAME}"` and one with all the other stuff (documentation or headers and library files to link standalone applications). The former package will be named: > `liblua{LUA_VERSION}-{PKG_NAME}{CABI}` or `liblua{LUA_VERSION}-{PKG_NAME}` depending if it has a C part or not. If `{PKG_NAME}` ends with a digit, a dash should be used to separate it from `{CABI}`. The latter will be named: > `liblua{LUA_VERSION}-{PKG_NAME}-dev` even if it contains only documentation (like pure lua libraries), since it may be modified in the future to include some C parts (and this would imply a renaming). The headers files `.h` are intended to declare the simple `luaopen_{LUA_MODNAME}` function. To avoid bloating the Debian archive with minuscule packages, refrain from providing a `-doc` package unless the documentation is very large. Including a short documentation in the `-dev` package does not hurt. If the same source package is able to provide more than one couple of deb packages (like luasql, that provides various backends) only one copy of the source package should be added to the archive and let that package generate all the needed debs. All packages should be named with a common prefix, like `liblua{LUA_VERSION}-{PKG_NAME}-` that in the case of luasql will produce the following debs: - `liblua{LUA_VERSION}-sql-mysql2` - `liblua{LUA_VERSION}-sql-mysql-dev` - `liblua{LUA_VERSION}-sql-sqlite2` - `liblua{LUA_VERSION}-sql-sqlite-dev` If the package is made of a common part the best would be to put them in a package which name ends with the `-common` suffix. All debs should then depend on it. This avoids playing with diversions. The same also applies to documentation, that (if common to all debs) should not be replicated on all `-dev` packages, but put in a `-doc` package. Packages Contents ----------------- Here a listing of the contents of the two packages will follow. ### Run time package: `liblua{LUA_VERSION}-{PKG_NAME}{CABI}` - `/usr/lib/liblua{LUA_VERSION}-{PKG_NAME}.so.{ABI}` - `/usr/lib/liblua{LUA_VERSION}-{PKG_NAME}.so.{CABI} -> liblua{LUA_VERSION}-{PKG_NAME}.so.{ABI}` - `/usr/lib/lua/{LUA_VERSION}/{LUA_MODNAME}.so -> ../../liblua{LUA_VERSION}-{PKG_NAME}.so.{ABI}` - `/usr/share/lua/{LUA_VERSION}/*.lua` ### Development package: `liblua{LUA_VERSION}-{PKG_NAME}-dev` - `/usr/inlude/lua{LUA_VERSION}/*.h` - `/usr/lib/liblua{LUA_VERSION}-{PKG_NAME}.a` - `/usr/lib/liblua{LUA_VERSION}-{PKG_NAME}.so -> liblua{LUA_VERSION}-{PKG_NAME}.so.{ABI}` - `/usr/share/doc/liblua{LUA_VERSION}-{PKG_NAME}-dev/*` - `/usr/lib/pkgconfig/lua{LUA_VERSION}-{PKG_NAME}.pc` Should a `-doc` package exist, only the following files will be contained in the package: - `/usr/share/doc/liblua{LUA_VERSION}-{PKG_NAME}-doc/*` ### Packages Contents (an example) *`liblua5.1-expat0`* - `/usr/lib/liblua5.1-expat.so.0.0.0` - `/usr/lib/liblua5.1-expat.so.0 -> liblua5.1-expat.so.0.0.0` - `/usr/lib/lua/5.1/lxp.so -> ../../liblua5.1-expat.so.0.0.0` - `/usr/share/lua/5.1/lxp/lom.lua` *`liblua5.1-expat-dev`* - `/usr/inlude/lua5.1/lxplib.h` - `/usr/lib/liblua5.1-expat.a` - `/usr/lib/liblua5.1-expat.so -> liblua5.1-expat.so.0.0.0` - `/usr/share/doc/liblua5.1-expat-dev/us/*html` - `/usr/lib/pkgconfig/lua5.1-expat.pc` Creating a package in a quick and clean way ------------------------------------------- Since all lua libraries look almost the same, we provide a common set of templates to help building packages conforming the policy and allowing single-place modification all over these packages. ### The `lua5.1-policy-dev` package The following files are contained in the package: - `Makefile.Debian` is a generic Makefile for lua libraries. It is fully configurable following the CDBS spirit, using hooks and parameters. - `app.c` and `app.c.conf.in` are automatically handled by `Makefile.Debian` and they implement an interpreter that calls `luaopen_{LUA_MODNAME}` and runs the file taken as parameter. `Makefile.Debian` test target links twice this interpreter (one time dynamically and one statically, i.e. including the library) and runs it on the test file. - `pkg-config.pc.in` is automatically handled by `Makefile.Debian` that will create for you a policy-conforming `.pc` file. Since these files are needed at compile time, you should put `lua5.1-policy-dev` in your `Build-Depends` field. In addition to these files it provides the following utility: - `lua5.1-policy-create-svnbuildpackage-layout` should be used to create the svn repository of the debian packages. It build an svn-buildpackage ready layout, adding the standard `debian/rules` file, a `debian/watch` template and a `debian/Makefile.Debian.conf` template. So, to package a new library, just enter an svn repository and call: > `lua5.1-policy-create-svnbuildpackage-layout {PKG_NAME}` Then it should suffice to edit `debian/Makefile.Debian.conf`. ### Writing a `debian/Makefile.Debian.conf` file You will find a template file called `Makefile.Debian.conf.sample` in these `lua5.1-policy-dev` package (see `/usr/share/lua5.1-policy-dev/templates`). Note that if you used the `lua5.1-policy-create-svnbuildpackage-layout` utility to create the package svn repository, you will find a template in `debian/`. The `PKG_NAME` field is *mandatory*, the usual name of the library should be used (like `curl` or `logging` for luacurl and lualogging). - `PKG_NAME=curl` The next part is for the C part of the library (if any). - `CLIB_CFLAGS= -I src/` - `CLIB_LDFLAGS= $(shell pkg-config libcurl --libs)` - `CLIB_LDFLAGS_STATIC= $(shell pkg-config libcurl --libs --static)` - `CLIB_OBJS= src/lxplib.lo` - `VERSION_INFO=0:0:0` Remember that all `.c` files have to produce a `.lo` files (in libtool tradition). List them in the `CLIB_OBJS` field. `CLIB_CFLAGS` and `CLIB_LDFLAGS` have the standard meaning (see the [make manual][5]), while the `CLIB_LDFLAGS_STATIC` variant is used when building the statically linked test application (if `LUA_TEST` is not empty). `VERSION_INFO` is libtool specific (read libtool documentation if in doubt). The next part is for the lua part of the library (if any). - `LUA_HEADER=src/lxplib.h` - `LUA_SOURCES=src/lxp` - `LUA_MODNAME=lxp` - `LUA_TEST=tests/test.lua` - `LUA_MODNAME_CPART=lxp` `LUA_MODNAME` will be the module name used inside lua (with `require`), if empty `PKG_NAME` will be used. `LUA_HEADER` points to the file (if any) that declares the `luaopen_LUA_MODNAME_CPART` C function (if the library has a C part), if omitted (and if the library has a C part) a trivial `.h` file will be automatically generated. `LUA_SOURCES` point to the `.lua` files or their root directory. `LUA_TEST` points to the test file that will be run once the library is compiled. `LUA_MODNAME_CPART` is the suffix of the C function to load the module (if empty `LUA_MODNAME` is used). The next part is for pkg-config (if the library has a C part). - `PKG_VERSION=` - `PKG_LIBS_PRIVATE=` - `PKG_URL=` - `PKG_REQUIRES=` - `PKG_CONFLICTS=` All these fields are explained in the manpage of pkg-config. The value of the first field can be extracted from the control file using the following line: > `$(shell dpkg-parsechangelog|grep ^Ver|cut -d ' ' -f 2|cut -d '-' -f 1)` The next part is relative to debian libraries naming policy, and it can be empty or `-` depending if the name of the package ends or not with a digit. If it is the case the package should be named `liblua{LUA_VERSION}-{PKG_NAME}-{CABI}`, otherwise `liblua{LUA_VERSION}-{PKG_NAME}{CABI}`. - `DEB_EXTRA_DASH=` The last part is for adding hooks in `Makefile.Debian`. These hooks are called in the following order. - `pre-all-hook` - `post-all-hook` - `pre-test-hook` - `pre-lua-dynamic-test-hook` - `pre-dynamic-link-hook` - `pre-app-dynamic-test-hook` - `pre-static-link-hook` - `pre-app-static-test-hook` - `pre-install-hook` - `post-install-hook` The clean target is customizable using the following hooks. - `pre-clean-hook` - `post-clean-hook` ### The `rules` file If you used the `lua5.1-policy-create-svnbuildpackage-layout` a standard file is placed in `debian/` for you. If not, you can use this one:
#!/usr/bin/make -f

include /usr/share/cdbs/1/class/lua.mk
### No `.install` files Since all `.install` files contain a common part, it will be added automatically by `Makefile.Debian` (if needed, e.g. if some files will be installed somewhere). If you really need to ship more files, you may add a `.install.in` file to add your paths. This `install.in` file will be transformed in a `.install` substituting the `@@LUA_VERSION@@` string with the `{LUA_VERSION}` value, substituting the `@@DEB_HOST_MULTIARCH@@` with the corresponding `dpkg-architecture -qDEB_HOST_MULTIARCH` value and appended with the standard paths if needed. These are the lines added to `liblua{LUA_VERSION}-{PKG_NAME}{CABI}.install`
/usr/share/lua/{LUA_VERSION}/*
/usr/lib/*.so.*
/usr/lib/lua/{LUA_VERSION}/LUA_MODNAME_UNDERSCORE.so
Where `LUA_MODNAME_UNDERSCORE` is `LUA_MODNAME` where `.` is replaced by `_`. These are the lines added to `liblua{LUA_VERSION}-{PKG_NAME}-dev.install`
/usr/lib/pkgconfig/*
/usr/include/lua{LUA_VERSION}/*
/usr/lib/*.so
/usr/lib/*.a
To install documentation, please use a `.docs` file. ### Multiple packages from the same source It is possible that the same source package provides more (and distinct) modules. This is the case for `luasql` that provides various backends. `Makefile.Debian` is able to cope with this situation if it finds a set of files (and not a single file) that match the pattern `debian/*Makefile.Debian.conf`. The variables `{PKG_NAME}` and `{LUA_MODNAME}` can be set using the `.` symbol to separate modules. In `luasql` the file `debian/mysql.Makefile.Debian.conf` defines: - `PKG_NAME=sql.mysql` - `LUA_MODNAME=luasql.mysql` The latter is the one expected since it is the same string used with `require`, while the former is used to infer the deb package name, substituting `.` with `-` when needed. ### Automatically testing your package If you specify the `LUA_TEST` variable in the `Makefile.Debian.conf` file, three tests will be performed after compilation and before building the package. * `lua-dynamic-test` calls the lua standard interpreter in the following way: `lua{LUA_VERSION} -l LUA_MODNAME LUA_TEST` (note that if you set `LUA_TEST` to something like `tests/test.lua arg1 arg2` the arguments will be passed to the test). The lua interpreter should found the `.lua` and eventual `.so` files in the current working directory. For that purpose `LUA_MODNAME` is used to make a symbolic link pointing to the real `.so` file during build phase. If you need a different setting, set an hook for `pre-lua-dynamic-test-hook` * `app-dynamic-test` builds a minimal application that is linked (at compile time) with the C par of the library (if any). This means that the lua interpreter should load the C part of the library calling a function that is already linked with the binary, and not use dlopen as in the previous test. This minimal application is `app.c` that includes a minimal configuration file that is tuned using the variables defined in `Makefile.Debian.conf` (see the [code snippet](#snippet-appconf) at the end of this section). The variables between `@@` will be replaced with their values (the `_UNDERSCORE` is simply the result of replacing `.` by `_`). This code means that when a `require` is issued for `LUA_MODNAME_CPART` the corresponding C function `luaopen_LUA_MODNAME_CPART_UNDERSCORE` is called * `app-static-test` behaves exactly as `app-dynamic-test`, but libtool is run to statically link the C code of the library into the `app` executable
  #include "@@LUA_HEADER@@"
  static void app_open(lua_State* L){
    lua_getglobal(L,"package");
    lua_getfield(L,-1,"preload");
    lua_pushcfunction(L,luaopen_@@LUA_MODNAME_CPART_UNDERSCORE@@);
    lua_setfield(L,-2,"@@LUA_MODNAME_CPART@@");
  }
Notes on undefined symbols and packages dependencies ---------------------------------------------------- All lua libraries are not linked against `liblua5.1.so`, so all `lua_` and `luaL_` prefixed symbols will appear as undefined (i.e. using `objdump -T` to inspect them and look for symbols marked with `*UND*`). This is a *feature* since: - The interpreter is statically linked with that library and exports all the needed symbols. This means that it is able to dlopen the library with any troubles. - Any application linked against `liblua5.1.so` has these symbols defined, thus can load the library safely. - If libraries are linked against `liblua5.1.so` you would see `liblua5.1.so` resident in memory loading them from the lua interpreter (try `cat /proc/PID/maps`). But the interpreter already had that code loaded. As a side effect, all lua libraries do not depend on the `liblua5.1` package (and must not declare it in the `Depends` field). All dependencies among other lua libraries must be declared. A `-dev` package must depend on the `-dev` packages corresponding to the other lua libraries that it uses, while the runtime package (non `-dev` package) must depend only on the runtime package relative to the other lua libraries that it uses. Notes on source package names ----------------------------- All source packages should be named `lua-{PKG_NAME}` for consistency. ------------------------------------------------------------------------------- This file follows the markdown syntax. See [Markdown][1] and [lua markdown][2]. $Id: policy.txt 1608 2011-07-19 21:36:28Z gareuselesinge $ [1]: http://daringfireball.net/projects/markdown/ "Markdown Homepage" [2]: http://luaforge.net/projects/markdown/ "Lua implementation of markdown" [3]: http://www.gnu.org/software/libtool/ "GNU Libtool" [4]: http://pkgconfig.freedesktop.org/wiki/ "pkg-config tool" [5]: http://www.gnu.org/software/make/manual/make.html "GNU Make" lua5.1-policy-33/doc/Makefile0000644000000000000000000000115010771205070012672 0ustar all: html/policy.html used-vars: lua get_used_vars.lua html/%.html:%.txt echo '' > $@ echo "" >> $@ echo "" >> $@ # assume first line of markdown is main header to use for page title echo "$(shell head -n 1 $<)" >> $@ echo '' >> $@ echo "" >> $@ echo "" >> $@ markdown $< >> $@ echo "" >> $@ echo "" >> $@ #tidy -e -q $@ || (rm $@ && false) clean: rm -f html/policy.html lua5.1-policy-33/debian/0000755000000000000000000000000011612051527011713 5ustar lua5.1-policy-33/debian/source/0000755000000000000000000000000011612051527013213 5ustar lua5.1-policy-33/debian/source/format0000644000000000000000000000001511612051365014422 0ustar 3.0 (native) lua5.1-policy-33/debian/copyright0000644000000000000000000000240510771205067013654 0ustar This is lua5.1-policy, written and maintained by Enrico Tassi on Fri Aug 25 15:30:18 CEST 2006 . The original source can always be found at: ftp://ftp.debian.org/dists/unstable/main/source/ Copyright © 2008 Enrico Tassi. 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. lua5.1-policy-33/debian/lua5.1-policy-dev.manpages0000644000000000000000000000000610771205067016507 0ustar man/* lua5.1-policy-33/debian/changelog0000644000000000000000000002102311612051446013563 0ustar lua5.1-policy (33) unstable; urgency=low * Source format 3.0 (native) -- Enrico Tassi Thu, 21 Jul 2011 18:26:08 +0200 lua5.1-policy (32) unstable; urgency=low * Some paths fixed to be Multi-Arch compliant * Updated standards-version to 3.9.2, no changes -- Enrico Tassi Wed, 20 Jul 2011 11:15:14 +0200 lua5.1-policy (31) unstable; urgency=low * Rework liker lines, kudos to Colin (Closes: #627394, LP: #770817) -- Enrico Tassi Mon, 23 May 2011 22:17:26 +0200 lua5.1-policy (30) unstable; urgency=low * SEGFAULT_SIGNALS=all for tests, so that SIGBUS is catched too -- Enrico Tassi Tue, 17 May 2011 16:32:45 +0200 lua5.1-policy (29) unstable; urgency=low * use catchsegv when running tests (Thanks Peter Odding for suggesting that) -- Enrico Tassi Sun, 15 May 2011 20:37:19 +0200 lua5.1-policy (28) unstable; urgency=low * app.c properly handles command line arguments read as "..." -- Enrico Tassi Mon, 09 May 2011 15:23:44 +0200 lua5.1-policy (27) unstable; urgency=low * do not ship .la files * removed libtool_lib from .pc (conforming with debian policy 3.9.1) * updated standards-version to 3.9.1, no changes needed -- Enrico Tassi Sun, 20 Feb 2011 14:00:20 +0100 lua5.1-policy (26) unstable; urgency=low * added -Wl,--no-add-needed to all linking commands, to ease the switch biutils-gold * new config variable CLIB_LDFLAGS_STATIC used when statically linking the application test (only done if LUA_TEST is not empty) * updated the doc mentioning CLIB_LDFLAGS_STATIC * bumped Standards-version to 3.8.3, no changes needed -- Enrico Tassi Fri, 13 Nov 2009 21:56:32 +0100 lua5.1-policy (25) unstable; urgency=low * generate .h files with comments that conform C89 -- Enrico Tassi Thu, 20 Aug 2009 19:07:03 +0200 lua5.1-policy (24) unstable; urgency=low * lua.mk: fixed typo in ifdef, double inclusion was not avoided * create-svn-layout: rules file svn-added after doing chmod a+x * template watch file: set luaforge project number to XXX instead of a valid, but wrong, one. -- Enrico Tassi Thu, 20 Aug 2009 17:34:07 +0200 lua5.1-policy (23) unstable; urgency=low * added template rules file -- Enrico Tassi Thu, 20 Aug 2009 13:05:18 +0200 lua5.1-policy (22) unstable; urgency=low * override LUA_INIT, avoids build failures in dirty environments (Closes: #507408) * CDBS class lua.mk, to essentially replace the standard debian/rules * lua-policy-apply removed, not needed anymore since files are directly used from /usr/share/ * bumped standards-version to 3.8.2, no changes needed -- Enrico Tassi Tue, 21 Jul 2009 18:17:30 +0200 lua5.1-policy (21) unstable; urgency=low * use /usr/lib/ as libtool -rpath option * fixed name in control, Lua instead of lua * added ${misc:Depends} to control to make lintina happy * bumped Standards-version to 3.8.1, no changes needed * avoid double / in some path not adding it after $(PREFIX) -- Enrico Tassi Sun, 17 May 2009 19:19:07 +0200 lua5.1-policy (20) unstable; urgency=low * relocated in the svn repository, thus Vcs-* have been updated accordingly -- Enrico Tassi Thu, 17 Apr 2008 10:52:39 +0200 lua5.1-policy (19) unstable; urgency=low * Run tests setting HOME, some buildds (most notably mipsel) have HOME set to an existing but not readable/writeable directory and that makes some software (most notably svn) fail * Fixed Vcs fields in control file * Fixed spelling errors -- Enrico Tassi Wed, 19 Mar 2008 16:39:26 +0100 lua5.1-policy (18) unstable; urgency=low * fixed app.c.conf generation using package name dependent stamps so that it is generated for every module. -- Enrico Tassi Wed, 12 Dec 2007 19:21:26 +0100 lua5.1-policy (17) unstable; urgency=low * removed -e in echo so that it is dash compatible (Thanks Michael Bienia for spotting that) * added Homepage control field * updated to debian-policy 3.7.3 * removed X- from XS-VCS-Svn control field -- Enrico Tassi Mon, 10 Dec 2007 21:40:04 +0100 lua5.1-policy (16) unstable; urgency=low * Fixed regression in handling install.in files introduced in the former release. -- Enrico Tassi Sun, 14 Oct 2007 15:54:37 +0200 lua5.1-policy (15) unstable; urgency=low * Fixed a syntax error in Makefile.Debian.single -- Enrico Tassi Tue, 11 Sep 2007 23:41:27 +0200 lua5.1-policy (14) unstable; urgency=low * .install files are not removed by mistake anymore * Default watch file now uses .tar.gz instead of .tgz -- Enrico Tassi Tue, 11 Sep 2007 23:23:50 +0200 lua5.1-policy (13) unstable; urgency=low * Renamed obesolete cdbs variable: TEST_TARGET -> CHECK_TARGET -- Enrico Tassi Sat, 28 Jul 2007 16:49:37 +0200 lua5.1-policy (12) unstable; urgency=low * Moved from DEB_MAKE_TEST_TARGET to DEB_MAKE_CHECK_TARGET since the former is obsolete * Tests are run only if DEB_HOST_ARCH and DEB_BUILD_ARCH are equal -- Enrico Tassi Fri, 22 Jun 2007 17:35:31 +0100 lua5.1-policy (11) unstable; urgency=low * Removed post-test-hook from the sample configuration file -- Enrico Tassi Tue, 19 Jun 2007 10:39:24 +0100 lua5.1-policy (10) unstable; urgency=low * Fixed sublte bug in the clean target that was not removing .libs/ in subdirectories -- Enrico Tassi Wed, 16 May 2007 15:06:13 +0200 lua5.1-policy (9) unstable; urgency=low * fixed svn repository url in control file * added a clarification about (pre|post)-clean-hook makefile hooks * added (pre|post)-clean-hook in the sample configuration file * removed bashisms, thanks Alexandre Erwin for bugreporting -- Enrico Tassi Fri, 23 Feb 2007 10:47:11 +0100 lua5.1-policy (8) unstable; urgency=low * added -r --reverse option to lua5.1-policy-apply that should be hooked to the clean:: target * updated doc and templates according to the new option -- Enrico Tassi Thu, 15 Feb 2007 11:41:16 +0100 lua5.1-policy (7) unstable; urgency=low * Fixed statically/dynamically linked app.c tests using package.preload -- Enrico Tassi Sat, 23 Dec 2006 18:52:18 +0100 lua5.1-policy (6) unstable; urgency=low * app.c now supports argument passing as the lua interpreter does. You can now pass arguments to the tests scripts. * Tests are skipped if LUA_TEST field is empty * Support for multiple packages from the same source package (i.e. bindings with multiple backends like luasql or luacrypto). * Makefile.Debian renamed to Makefile.Debian.single * Added the "iterator" Makefile.Debian.multiple * lua5.1-policy-apply now adds a symbolic link: Makefile.Debian -> Makefile.Debian.multiple * Updated policy.txt accordingly. * Added XS-X-Vcs-svn to control. -- Enrico Tassi Fri, 6 Oct 2006 22:17:23 +0200 lua5.1-policy (5) unstable; urgency=low * Fixed an inverted conditional expression that prevented the setting of mergeWithUpstream svn property. -- Enrico Tassi Tue, 3 Oct 2006 13:36:22 +0200 lua5.1-policy (4) unstable; urgency=low * Fixed Makefile.Debian so that no -doc package is assumed. -- Enrico Tassi Sat, 16 Sep 2006 12:28:42 +0200 lua5.1-policy (3) unstable; urgency=low * Some minor issues fixed: - no more -doc/-dev distinction (always -dev) - added mention of '-' as a separator between the package name and the abi if the package name ands with a digit -- Enrico Tassi Sat, 16 Sep 2006 11:59:07 +0200 lua5.1-policy (2) unstable; urgency=low * added Recommends: subversion (the lua5.1-policy-create-svnbuildpackage-layout now works even if subversion is not available) -- Enrico Tassi Mon, 28 Aug 2006 15:42:24 +0200 lua5.1-policy (1) unstable; urgency=low * Initial release. (Closes: #384743) -- Enrico Tassi Sat, 26 Aug 2006 15:07:15 +0200 lua5.1-policy-33/debian/lua5.1-policy-dev.dirs0000644000000000000000000000007711231276322015657 0ustar /usr/bin /usr/share/lua5.1-policy-dev /usr/share/cdbs/1/class/ lua5.1-policy-33/debian/compat0000644000000000000000000000000211231357217013113 0ustar 5 lua5.1-policy-33/debian/control0000644000000000000000000000237411611516235013325 0ustar Source: lua5.1-policy Section: doc Priority: optional Maintainer: Enrico Tassi Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5.0.0), markdown Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/pkg-lua/packages/lua5.1-policy Vcs-Browser: http://svn.debian.org/viewsvn/pkg-lua/packages/lua5.1-policy Homepage: http://pkg-lua.alioth.debian.org/ Package: lua5.1-policy Architecture: all Depends: ${misc:Depends} Description: Lua 5.1 Debian policy This package contains the Debian policy for the Debian packages relative to the lua5.1 scripting language. Package: lua5.1-policy-dev Section: devel Recommends: subversion Architecture: all Depends: libtool, pkg-config, lua5.1, liblua5.1-0-dev, cdbs (>= 0.4.33), make, ${misc:Depends} Description: Lua 5.1 Debian policy - template and scripts This package contains some template/support files (like a generic Makefile, a generic test application...) that can be used by Lua libraries at compile time. It also includes a simple script that sets up an svn directory conforming to svn-buildpackage and populates it with the standard files needed to use lua5.1-policy-dev at build time. Obviously packages made using lua5.1-policy-dev will conform to the policy contained in lua5.1-policy. lua5.1-policy-33/debian/lua5.1-policy.docs0000644000000000000000000000003010771205067015065 0ustar doc/html doc/policy.txt lua5.1-policy-33/debian/rules0000755000000000000000000000031211612051234012762 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/class/makefile.mk include /usr/share/cdbs/1/rules/debhelper.mk DEB_MAKE_INSTALL_TARGET= install # work around cdbs bug #284231 unpatch: deapply-dpatches lua5.1-policy-33/man/0000755000000000000000000000000011612051527011244 5ustar lua5.1-policy-33/man/lua5.1-policy-create-svnbuildpackage-layout.10000644000000000000000000000371611231321676021555 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH lua5.1-policy-create-svnbuildpackage-layout 1 "Aug 2006" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME lua5.1-policy-create-svnbuildpackage-layout \- program to create an svn-buildpackage compliat repository for a lua package. .SH SYNOPSIS .B lua5.1-policy-create-svnbuildpackage-layout \fIPKG\fR .SH DESCRIPTION .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBlua5.1-policy-create-svnbuildpackage-layout\fP is a program that creates a standard layout for svn-buildpackage. It must be called inside an svn repository, usually in the packages/ directory. It will create the following files: .br .sp 1 $PKG/trunk .br $PKG/tags .br $PKG/build-area .br $PKG/tarballs .br $PKG/trunk/debian .br $PKG/trunk/debian/patches .br $PKG/trunk/debian/patches/00list .br $PKG/trunk/debian/patches/00dpatch.conf .br $PKG/trunk/debian/watch .br $PKG/trunk/debian/Makefile.Debian.conf .br $PKG/trunk/debian/rules .br .sp 1 It also sets the svn property \fBsvn:ignore\fR to \fB'*'\fR on $PKG/build-area and \fBmergeWithUpstream\fR to \fB1\fR on $PKG/trunk/debian. .SH AUTHOR lua5.1-policy-create-svnbuildpackage-layout was written by Enrico Tassi. .PP This manual page was written by Enrico Tassi , for the Debian project (but may be used by others). lua5.1-policy-33/Makefile0000644000000000000000000000043411243226747012142 0ustar all: make -C doc install: cp bin/* debian/lua5.1-policy-dev/usr/bin/ cp templates/* debian/lua5.1-policy-dev/usr/share/lua5.1-policy-dev mv debian/lua5.1-policy-dev/usr/share/lua5.1-policy-dev/lua.mk \ debian/lua5.1-policy-dev/usr/share/cdbs/1/class/ clean: make -C doc clean lua5.1-policy-33/bin/0000755000000000000000000000000011612051527011241 5ustar lua5.1-policy-33/bin/lua5.1-policy-create-svnbuildpackage-layout0000755000000000000000000000315411243266310021406 0ustar #!/bin/sh if [ -z "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then echo Give as a unique argument the name of the source package echo that will be the name of the root directory of the package. echo Be sure to start this script from your packages/ directory. exit 1 fi PKG=$1 SVN= if [ -x /usr/bin/svn ]; then SVN=/usr/bin/svn else echo warning: No /usr/bin/svn found echo warning: The directory structure will be created, but no items echo warning: will be added to the svn repository nor svn properties echo warning: will be set. fi $SVN mkdir $PKG $SVN mkdir $PKG/trunk $SVN mkdir $PKG/tags $SVN mkdir $PKG/build-area $SVN mkdir $PKG/tarballs $SVN mkdir $PKG/trunk/debian $SVN mkdir $PKG/trunk/debian/patches touch $PKG/trunk/debian/patches/00list cat > $PKG/trunk/debian/patches/00dpatch.conf < $PKG/trunk/debian/watch <