-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_spec_content.txt
66 lines (59 loc) · 1.85 KB
/
test_spec_content.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
%define luarocks_pkg_name lua-cjson
%define luarocks_pkg_version 2.1.0.11-1
%define luarocks_pkg_prefix lua-cjson-2.1.0.11-1
%define luarocks_pkg_major 2.1.0.11
%define luarocks_pkg_minor 1
Name: lua-cjson
Version: %{luarocks_pkg_major}
Release: %{luarocks_pkg_minor}
Summary: A fast JSON encoding/parsing module
Url: http://www.kyne.com.au/~mark/software/lua-cjson.php
License: MIT
Source0: lua-cjson-2.1.0.11-1.tar.gz
Source1: lua-cjson-2.1.0.11-1.rockspec
BuildRequires: lua-rpm-macros
Requires(postun): alternatives
Requires(post): alternatives
Provides: %{luadist %{luarocks_pkg_name} = %{luarocks_pkg_version}}
%global __luarocks_requires %{_bindir}/true
%global __luarocks_provides %{_bindir}/true
Requires: %{luadist lua >= 5.1}
%if %{defined luarocks_buildrequires}
BuildRequires: %{luarocks_buildrequires}
%endif
Provides: luadist(%{luarocks_pkg_name}) = %{luarocks_pkg_version}
%description
The Lua CJSON module provides JSON support for Lua. It features:
- Fast, standards compliant encoding/parsing routines
- Full support for JSON with UTF-8, including decoding surrogate pairs
- Optional run-time support for common exceptions to the JSON specification
(infinity, NaN,..)
- No dependencies on other libraries
%prep
%autosetup -p1 -n %{luarocks_pkg_prefix}
%luarocks_prep
%build
%{?custom_build}
%if %{defined luarocks_pkg_build}
%luarocks_pkg_build %{lua_version}
%else
%luarocks_build --local
%endif
%install
%{?custom_install}
%if %{defined luarocks_pkg_install}
%luarocks_pkg_install %{lua_version}
%else
%luarocks_install %{luarocks_pkg_prefix}.*.rock
%endif
%check
%if %{with check}
%{?luarocks_check}
%endif
%post %{?lua_scriplets}
%add_lua_binary json2lua -p 25 -b %{_bindir}
%add_lua_binary lua2json -p 25 -b %{_bindir}
%postun %{?lua_scriplets}
%drop_lua_binary json2lua
%drop_lua_binary lua2json
%files %{?lua_files}