%{!?lua_version: %global lua_version %{lua: print(string.sub(_VERSION, 5))}} %{!?lua_pkgdir: %global lua_pkgdir %{_datadir}/lua/%{lua_version}} %global luapkgname loadkit Name: lua-%{luapkgname} Version: 1.1.0 Release: 1%{?dist} Summary: Load arbitrary files within the Lua package path License: MIT URL: https://github.com/leafo/%{luapkgname} Source0: https://github.com/leafo/%{luapkgname}/archive/refs/tags/v%{version}.tar.gz BuildArch: noarch BuildRequires: lua-devel BuildRequires: luarocks %description Loadkit lets you register new file extension handlers that can be opened with require, or you can just search for files of any extension using the current search path. %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.md %{lua_pkgdir}/* %changelog * Thu Jun 30 2022 Johannes Maibaum - 1.1.0-1 - Initial spec file for lua-loadkit