lua-cjson.spec 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. %define luaver 5.1
  2. %define lualibdir %{_libdir}/lua/%{luaver}
  3. %define luadatadir %{_datadir}/lua/%{luaver}
  4. Name: lua-cjson
  5. Version: 2.1devel
  6. Release: 1%{?dist}
  7. Summary: A fast JSON encoding/parsing module for Lua
  8. Group: Development/Libraries
  9. License: MIT
  10. URL: http://www.kyne.com.au/~mark/software/lua-cjson/
  11. Source0: http://www.kyne.com.au/~mark/software/lua-cjson/download/lua-cjson-%{version}.tar.gz
  12. BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
  13. BuildRequires: lua >= %{luaver}, lua-devel >= %{luaver}
  14. Requires: lua >= %{luaver}
  15. %description
  16. The Lua CJSON module provides JSON support for Lua. It features:
  17. - Fast, standards compliant encoding/parsing routines
  18. - Full support for JSON with UTF-8, including decoding surrogate pairs
  19. - Optional run-time support for common exceptions to the JSON specification
  20. (infinity, NaN,..)
  21. - No dependencies on other libraries
  22. %prep
  23. %setup -q
  24. %build
  25. make %{?_smp_mflags} CFLAGS="%{optflags}" LUA_INCLUDE_DIR="%{_includedir}"
  26. %install
  27. rm -rf "$RPM_BUILD_ROOT"
  28. make install DESTDIR="$RPM_BUILD_ROOT" LUA_CMODULE_DIR="%{lualibdir}"
  29. make install-extra DESTDIR="$RPM_BUILD_ROOT" LUA_MODULE_DIR="%{luadatadir}" \
  30. LUA_BIN_DIR="%{_bindir}"
  31. %clean
  32. rm -rf "$RPM_BUILD_ROOT"
  33. %preun
  34. /bin/rm -f "%{luadatadir}/cjson/tests/utf8.dat"
  35. %files
  36. %defattr(-,root,root,-)
  37. %doc LICENSE NEWS performance.html performance.txt manual.html manual.txt rfc4627.txt THANKS
  38. %{lualibdir}/*
  39. %{luadatadir}/*
  40. %{_bindir}/*
  41. %changelog
  42. * Thu Mar 1 2012 Mark Pulford <mark@kyne.com.au> - 2.1.0-1
  43. - Update for 2.1.0
  44. * Sun Jan 22 2012 Mark Pulford <mark@kyne.com.au> - 2.0.0-1
  45. - Update for 2.0.0
  46. - Install lua2json / json2lua utilities
  47. * Wed Nov 27 2011 Mark Pulford <mark@kyne.com.au> - 1.0.4-1
  48. - Update for 1.0.4
  49. * Wed Sep 15 2011 Mark Pulford <mark@kyne.com.au> - 1.0.3-1
  50. - Update for 1.0.3
  51. * Sun May 29 2011 Mark Pulford <mark@kyne.com.au> - 1.0.2-1
  52. - Update for 1.0.2
  53. * Sun May 10 2011 Mark Pulford <mark@kyne.com.au> - 1.0.1-1
  54. - Update for 1.0.1
  55. * Sun May 1 2011 Mark Pulford <mark@kyne.com.au> - 1.0-1
  56. - Initial package