summaryrefslogtreecommitdiff
path: root/lua-cjson.spec
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2011-05-01 19:51:55 +0930
committerMark Pulford <mark@kyne.com.au>2011-05-01 19:51:55 +0930
commitf89fb30058a7d2d6a896ace242fc612bfe4e2c34 (patch)
tree1a31682894a1057671d2f5d52a420d2a26f3413c /lua-cjson.spec
parent6fb4dd5283870100dd2e877327c923953d8639eb (diff)
downloadlua-cjson-f89fb30058a7d2d6a896ace242fc612bfe4e2c34.tar.gz
lua-cjson-f89fb30058a7d2d6a896ace242fc612bfe4e2c34.tar.bz2
lua-cjson-f89fb30058a7d2d6a896ace242fc612bfe4e2c34.zip
Add build and package support
- Add Makefile and RPM spec file - Add cjson.version variable
Diffstat (limited to 'lua-cjson.spec')
-rw-r--r--lua-cjson.spec48
1 files changed, 48 insertions, 0 deletions
diff --git a/lua-cjson.spec b/lua-cjson.spec
new file mode 100644
index 0000000..d5eb0c2
--- /dev/null
+++ b/lua-cjson.spec
@@ -0,0 +1,48 @@
1%define luaver 5.1
2%define lualibdir %{_libdir}/lua/%{luaver}
3
4Name: lua-cjson
5Version: 1.0
6Release: 1%{?dist}
7Summary: JSON support for the Lua language
8
9Group: Development/Libraries
10License: MIT
11URL: http://www.kyne.com.au/~mark/software/lua-cjson/
12Source0: http://www.kyne.com.au/~mark/software/lua-cjson/lua-cjson-%{version}.tar.gz
13BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
14
15BuildRequires: lua >= %{luaver}, lua-devel >= %{luaver}
16Requires: lua >= %{luaver}
17
18%description
19CJSON provides fast JSON parsing and encoding functions for Lua. It
20allows a Lua application to quickly serialise a data structure to
21JSON, or deserialise from JSON to Lua.
22
23%prep
24%setup -q
25
26
27%build
28make %{?_smp_mflags} CFLAGS="%{optflags}" LUA_INCLUDE_DIR="%{_includedir}"
29
30
31%install
32rm -rf "$RPM_BUILD_ROOT"
33make install DESTDIR="$RPM_BUILD_ROOT" LUA_LIB_DIR="%{lualibdir}"
34
35
36%clean
37rm -rf "$RPM_BUILD_ROOT"
38
39
40%files
41%defattr(-,root,root,-)
42%doc LICENSE rfc4627.txt
43%{lualibdir}/*
44
45
46%changelog
47* Sun May 1 2011 Mark Pulford <mark@kyne.com.au> - 1.0-1
48- Initial package