%{!?lua_version: %global lua_version %{lua: print(string.sub(_VERSION, 5))}} %{!?lua_pkgdir: %global lua_pkgdir %{_datadir}/lua/%{lua_version}} %global luapkgname cassowary Name: lua-%{luapkgname} Version: 2.3.2 Release: 1%{?dist} Summary: Lua port of the cassowary constraint solver engine. License: MIT URL: https://luarocks.org/modules/simoncozens/%{luapkgname} Source0: https://github.com/sile-typesetter/%{luapkgname}.lua/archive/refs/tags/v%{version}.tar.gz BuildArch: noarch BuildRequires: lua-devel BuildRequires: luarocks Requires: lua-penlight %description A Lua port of the cassowary constraint solver engine. %prep %autosetup -n %{luapkgname}.lua-%{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.md %license LICENSE %{lua_pkgdir}/* %changelog * Tue Apr 26 2022 Johannes Maibaum - 2.3.2-1 - Update to version 2.3.2 * Mon Oct 18 2021 Johannes Maibaum - 2.3.1-1 - Initial spec file for lua-cassowary