-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlua-dkjson.spec
More file actions
63 lines (45 loc) · 1.78 KB
/
lua-dkjson.spec
File metadata and controls
63 lines (45 loc) · 1.78 KB
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
%define debug_package %{nil}
%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))")}
# for arch-independent modules
%global luapkgdir %{_datadir}/lua/%{luaver}
Name: lua-dkjson
Version: 2.5
Release: 1%{?dist}
Summary: David Kolf's JSON module for Lua 5.1/5.2
License: MIT
URL: http://dkolf.de/src/dkjson-lua.fsl/home
Source0: dkjson.lua
Source1: readme.txt
BuildArch: noarch
BuildRequires: lua-devel >= %{luaver}
%if 0%{?rhel} == 6
Requires: lua >= %{luaver}
Requires: lua < 5.2
%else
Requires: lua(abi) >= %{luaver}
%endif
Requires: lua-lpeg
%description
This is a JSON module written in Lua. It supports UTF-8.
JSON (JavaScript Object Notation) is a format for serializing data based on the
syntax for JavaScript data structures. It is an ideal format for transmitting
data between different applications and commonly used for dynamic web pages. It
can also be used to save Lua data structures, but you should be aware that not
every Lua table can be represented by the JSON standard. For example tables
that contain both string keys and an array part cannot be exactly represented
by JSON. You can solve this by putting your array data in an explicit subtable.
dkjson is written in Lua without any dependencies, but when LPeg is available
dkjson uses it to speed up decoding.
%prep
%build
%install
install -d %{buildroot}%{luapkgdir}/
install -p -m644 %{SOURCE0} %{buildroot}%{luapkgdir}/
install -d %{buildroot}%{_datadir}/doc/%{name}-%{version}/
install -p -m644 %{SOURCE1} %{buildroot}%{_datadir}/doc/%{name}-%{version}/
%files
%doc %{_datadir}/doc/%{name}-%{version}/
%{luapkgdir}/dkjson.lua
%changelog
* Thu May 19 2016 Jajauma's Packages <jajauma@yandex.ru> - 2.5-1
- Public release