%{!?lua_version: %global lua_version %{lua: print(string.sub(_VERSION, 5))}} %{!?lua_pkgdir: %global lua_pkgdir %{_datadir}/lua/%{lua_version}} %global luapkgname cosmo Name: lua-%{luapkgname} Version: 16.06.04 Release: 1%{?dist} Summary: Cosmo is a "safe templates" engine for Lua. License: MIT URL: https://github.com/mascarenhas/%{luapkgname} Source0: https://github.com/mascarenhas/%{luapkgname}/archive/refs/tags/v%{version}.tar.gz BuildArch: noarch BuildRequires: lua-devel BuildRequires: luarocks %description Cosmo is a "safe templates" engine. It allows you to fill nested templates, providing many of the advantages of Turing-complete template engines, without without the downside of allowing arbitrary code in the templates. %prep %autosetup -n %{luapkgname}-%{version} %install rm -rf %{buildroot} luarocks --tree=%{buildroot}/usr \ make --deps-mode=none --no-manifest # Remove luarocks metadata rm -rf %{buildroot}/usr/lib %files %doc README %{lua_pkgdir}/* %changelog * Mon Oct 18 2021 Johannes Maibaum - 16.06.04-1 - Initial spec file for lua-cosmo