From: Michael Tremer Date: Sat, 28 Feb 2009 13:11:05 +0000 (+0100) Subject: Added new package: lua. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6a6169607b0fae909a237a1b5df3a09e1644f56;p=ipfire-3.x.git Added new package: lua. --- diff --git a/lfs/lua b/lfs/lua new file mode 100644 index 000000000..03369ddbe --- /dev/null +++ b/lfs/lua @@ -0,0 +1,103 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008, 2009 Michael Tremer & Christian Schmidt # +# # +# 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 3 of the License, 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, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +PKG_NAME = lua +PKG_VER = 5.1.4 +PKG_REL = 0 + +THISAPP = $(PKG_NAME)-$(PKG_VER) +DL_FILE = $(THISAPP).tar.gz +DIR_APP = $(DIR_SRC)/$(THISAPP) + +OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) + +MAINTAINER = +GROUP = Development/Languages +EXTRA = no +DEBUG = no +DEPS = ncurses readline + +URL = http://www.lua.org/ +LICENSE = MIT +SHORT_DESC = Powerful light-weight programming language. + +define LONG_DESC + Lua is a powerful light-weight programming language designed for \ + extending applications. Lua is also frequently used as a \ + general-purpose, stand-alone language. Lua is free software. \ + Lua combines simple procedural syntax with powerful data description \ + constructs based on associative arrays and extensible semantics. Lua \ + is dynamically typed, interpreted from bytecodes, and has automatic \ + memory management with garbage collection, making it ideal for \ + configuration, scripting, and rapid prototyping. +endef + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) \ + $(THISAPP)-autotoolize.patch + +download: $(objects) + +info: + $(DO_PKG_INFO) + +install: $(OBJECT) + +package: + @$(DO_PACKAGE) + +$(objects): + @$(LOAD) + +############################################################################### +# Installation Details +############################################################################### + +$(OBJECT): $(objects) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-autotoolize.patch + cd $(DIR_APP) && chmod u+x autogen.sh config.guess config.sub configure \ + depcomp install-sh missing + cd $(DIR_APP) && autoconf + cd $(DIR_APP) && \ + ./configure \ + $(CONFIGURE_ARCH) \ + --prefix=/usr \ + --with-readline + cd $(DIR_APP) && sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ + -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' -i libtool + # hack so that only /usr/bin/lua gets linked with readline as it is the + # only one which needs this and otherwise we get License troubles + cd $(DIR_APP) && make $(PARALLELISMFLAGS) LIBS="-ldl" luac_LDADD="liblua.la -lm -ldl" + # also remove readline from lua.pc + cd $(DIR_APP) && sed -i 's/-lreadline -lncurses //g' etc/lua.pc + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD)