%{!?luaver: %global luaver %(test -x /usr/bin/lua && lua -e "print(string.sub(_VERSION, 5))" || echo 5.3)} %global lualibdir %{_libdir}/lua/%{luaver} %global luapkgdir %{_datadir}/lua/%{luaver} Name: lua-cjson Version: 2.1.0 Release: 1%{?dist} Summary: A module that provides JSON support for Lua License: MIT URL: https://www.kyne.com.au/~mark/software/%{name}.php Source0: https://www.kyne.com.au/~mark/software/download/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: pkgconfig(lua) >= %{luaver} %description The Lua CJSON module provides JSON support for Lua. 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 %define debug_package %{nil} %prep %autosetup %build %make_build LUA_VERSION=%{luaver} LUA_INCLUDE_DIR="%{_includedir}" %install %make_install LUA_VERSION=%{luaver} LUA_CMODULE_DIR="%{lualibdir}" \ LUA_BIN_DIR="%{_bindir}" %files %license LICENSE %doc manual.html manual.txt THANKS NEWS tests/ performance.html performance.txt %{lualibdir}/* %changelog * Fri Aug 24 2018 Jani Juhani Sinervo -