diff options
author | Mark Pulford <mark@kyne.com.au> | 2011-05-01 19:51:55 +0930 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2011-05-01 19:51:55 +0930 |
commit | f89fb30058a7d2d6a896ace242fc612bfe4e2c34 (patch) | |
tree | 1a31682894a1057671d2f5d52a420d2a26f3413c /lua-cjson.spec | |
parent | 6fb4dd5283870100dd2e877327c923953d8639eb (diff) | |
download | lua-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.spec | 48 |
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 | |||
4 | Name: lua-cjson | ||
5 | Version: 1.0 | ||
6 | Release: 1%{?dist} | ||
7 | Summary: JSON support for the Lua language | ||
8 | |||
9 | Group: Development/Libraries | ||
10 | License: MIT | ||
11 | URL: http://www.kyne.com.au/~mark/software/lua-cjson/ | ||
12 | Source0: http://www.kyne.com.au/~mark/software/lua-cjson/lua-cjson-%{version}.tar.gz | ||
13 | BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | ||
14 | |||
15 | BuildRequires: lua >= %{luaver}, lua-devel >= %{luaver} | ||
16 | Requires: lua >= %{luaver} | ||
17 | |||
18 | %description | ||
19 | CJSON provides fast JSON parsing and encoding functions for Lua. It | ||
20 | allows a Lua application to quickly serialise a data structure to | ||
21 | JSON, or deserialise from JSON to Lua. | ||
22 | |||
23 | %prep | ||
24 | %setup -q | ||
25 | |||
26 | |||
27 | %build | ||
28 | make %{?_smp_mflags} CFLAGS="%{optflags}" LUA_INCLUDE_DIR="%{_includedir}" | ||
29 | |||
30 | |||
31 | %install | ||
32 | rm -rf "$RPM_BUILD_ROOT" | ||
33 | make install DESTDIR="$RPM_BUILD_ROOT" LUA_LIB_DIR="%{lualibdir}" | ||
34 | |||
35 | |||
36 | %clean | ||
37 | rm -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 | ||