From 35e81a9c4143890771553c38dce0719630b37517 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Sun, 15 May 2011 23:46:24 +0930 Subject: Add rockspec to build under LuaRocks Remove "-lm" from LDFLAGS in Makefile since it breaks the build under Windows and isn't required under Linux. Math lib fix suggested by: Steve Donovan --- Makefile | 1 - lua-cjson-1.0.1-1.rockspec | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 lua-cjson-1.0.1-1.rockspec diff --git a/Makefile b/Makefile index e96d736..f28568f 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ LUA_LIB_DIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION) #CFLAGS ?= -g -Wall -pedantic -fno-inline CFLAGS ?= -g -O3 -Wall -pedantic override CFLAGS += -fpic -I$(LUA_INCLUDE_DIR) -DVERSION=\"$(CJSON_VERSION)\" -LDFLAGS += -lm INSTALL ?= install diff --git a/lua-cjson-1.0.1-1.rockspec b/lua-cjson-1.0.1-1.rockspec new file mode 100644 index 0000000..aa89fd3 --- /dev/null +++ b/lua-cjson-1.0.1-1.rockspec @@ -0,0 +1,31 @@ +package = "lua-cjson" +version = "1.0.1-1" + +source = { + url = "http://www.kyne.com.au/~mark/software/lua-cjson-1.0.1.tar.gz", +} + +description = { + summary = "Fast JSON encoding/parsing support for Lua", + detailed = [[ + Lua CJSON provides fast UTF-8 JSON parsing/encoding support for Lua, + and has no external dependencies. + ]], + homepage = "http://www.kyne.com.au/~mark/software/lua-cjson.php", + license = "MIT" +} + +dependencies = { + "lua >= 5.1" +} + +build = { + type = "builtin", + modules = { + cjson = { + sources = { "lua_cjson.c", "strbuf.c" }, + defines = { "VERSION=\"1.0.1\"" } + } + }, + copy_directories = { "tests" } +} -- cgit v1.2.3-55-g6feb