Package init
This commit is contained in:
commit
0688564657
49
lua-json.spec
Normal file
49
lua-json.spec
Normal file
@ -0,0 +1,49 @@
|
||||
Name: lua-json
|
||||
Version: 1.3.2
|
||||
Release: 12
|
||||
License: MIT
|
||||
Summary: JSON Parser/Constructor for Lua
|
||||
|
||||
%define luaversion 5.3
|
||||
%define luapkgdir %{_datadir}/lua/%{luaversion}
|
||||
%global commitid 7a86bc22066858afeb23845a191a6ab680b46233
|
||||
%global shortid %(c=%{commitid}; echo ${c:0:7})
|
||||
|
||||
URL: http://github.com/harningt/luajson/
|
||||
Source0: https://github.com/harningt/luajson/archive/%{commitid}/luajson-%{version}-%{shortid}.tar.gz
|
||||
# for build and check
|
||||
BuildRequires: lua >= %{luaversion}, lua-lpeg >= 0.8.1
|
||||
BuildRequires: lua-filesystem >= 1.4.1, lua-lunit >= 0.4
|
||||
BuildArch: noarch
|
||||
# for run
|
||||
Requires: lua >= %{luaversion}, lua-lpeg >= 0.8.1
|
||||
|
||||
Patch0: luajson-lua-5.2.patch
|
||||
|
||||
%description
|
||||
JSON parser/encoder for Lua Parses JSON using LPEG for speed and flexibility.
|
||||
Depending on parser/encoder options, various values are preserved as best as possible.
|
||||
|
||||
%prep
|
||||
%setup -q -n luajson-%{commitid}
|
||||
%patch0 -p1 -b .lua-52
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{luapkgdir}
|
||||
cp -pr lua/* $RPM_BUILD_ROOT%{luapkgdir}
|
||||
|
||||
%check
|
||||
make check-regression
|
||||
|
||||
%files
|
||||
%doc LICENSE docs/LuaJSON.txt docs/ReleaseNotes-1.0.txt
|
||||
%{luapkgdir}/*
|
||||
|
||||
%changelog
|
||||
* Thu Sep 5 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.3.2-12
|
||||
- Fix package name
|
||||
|
||||
* Thu Sep 5 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.3.2-11
|
||||
- Package init
|
||||
BIN
luajson-1.3.2-7a86bc2.tar.gz
Normal file
BIN
luajson-1.3.2-7a86bc2.tar.gz
Normal file
Binary file not shown.
24
luajson-lua-5.2.patch
Normal file
24
luajson-lua-5.2.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -up luajson-7a86bc22066858afeb23845a191a6ab680b46233/lua/json/decode/state.lua.lua-52 luajson-7a86bc22066858afeb23845a191a6ab680b46233/lua/json/decode/state.lua
|
||||
--- luajson-7a86bc22066858afeb23845a191a6ab680b46233/lua/json/decode/state.lua.lua-52 2013-05-10 16:32:47.277329679 -0400
|
||||
+++ luajson-7a86bc22066858afeb23845a191a6ab680b46233/lua/json/decode/state.lua 2013-05-10 16:33:19.301328534 -0400
|
||||
@@ -8,7 +8,7 @@ local jsonutil = require("json.util")
|
||||
local assert = assert
|
||||
local type = type
|
||||
local next = next
|
||||
-local unpack = unpack
|
||||
+local unpack = table.unpack
|
||||
|
||||
local _ENV = nil
|
||||
|
||||
diff -up luajson-7a86bc22066858afeb23845a191a6ab680b46233/tests/lunit-encoderfunc.lua.lua-52 luajson-7a86bc22066858afeb23845a191a6ab680b46233/tests/lunit-encoderfunc.lua
|
||||
--- luajson-7a86bc22066858afeb23845a191a6ab680b46233/tests/lunit-encoderfunc.lua.lua-52 2013-05-10 16:31:50.764331699 -0400
|
||||
+++ luajson-7a86bc22066858afeb23845a191a6ab680b46233/tests/lunit-encoderfunc.lua 2013-05-10 16:32:00.788331341 -0400
|
||||
@@ -8,7 +8,7 @@ local setmetatable = setmetatable
|
||||
module("lunit-encoderfunc", lunit.testcase, package.seeall)
|
||||
|
||||
local function build_call(name, parameters)
|
||||
- return json.util.buildCall(name, unpack(parameters, parameters.n))
|
||||
+ return json.util.buildCall(name, table.unpack(parameters, parameters.n))
|
||||
end
|
||||
|
||||
function test_param_counts()
|
||||
Loading…
x
Reference in New Issue
Block a user