# # spec file # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define flavor lua54 %define _name lgi %define mod_name lpeg Version: 1.1.0 Release: 1.6 Summary: Parsing Expression Grammars For Lua License: MIT Group: Development/Libraries/Other URL: http://www.inf.puc-rio.br/~roberto/lpeg Source: http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-%{version}.tar.gz BuildRequires: %{flavor}-devel BuildRequires: lua-macros Requires: %{flavor} %lua_provides %if "%{flavor}" == "" Name: lua-%{mod_name} ExclusiveArch: do_not_build %else Name: %{flavor}-%{mod_name} Provides: %{flavor}-LPeg = %{version} Obsoletes: %{flavor}-LPeg < %{version} %endif %description LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). %package doc Summary: Lua Documentation for %{mod_name} Group: Development/Languages/Other Requires: %{name} = %{version} BuildArch: noarch %description doc Documentation and examples included with the library, sometimes generated by luadoc or ldoc. %prep %setup -q -n lpeg-%{version} # Set our cflags sed -i \ -e 's:../lua/:%{lua_incdir}:' \ -e 's: -O2: %{optflags}:g' \ makefile %build make %{?_make_output_sync} %install mkdir -p %{buildroot}%{_docdir}/%{name} mkdir -p %{buildroot}%{lua_archdir} mkdir -p %{buildroot}%{lua_noarchdir} install lpeg.so %{buildroot}%{lua_archdir} install -Dm 644 re.lua %{buildroot}%{lua_noarchdir} %check LUA_PATH='%{_datadir}/lua/%{lua_version}/?.lua' LUA_PATH="%{buildroot}%{lua_noarchdir}/?/init.lua;${LUA_PATH}" export LUA_PATH="%{buildroot}%{lua_noarchdir}/?.lua;${LUA_PATH}" %{_bindir}/lua%{lua_version} test.lua %files %{lua_archdir} %{lua_noarchdir} %files doc %doc re.html lpeg.html HISTORY %changelog * Tue Jul 11 2023 Gordon Leung - Update to 1.1.0 * No change log from upstream and no usage of a git forge so that's it... * Wed Jan 25 2023 Michal Suchanek - Opencode %%make_build to prevent build failure when not defined. * Wed Nov 23 2022 Michal Suchanek - Fix missing dependency on lua-macros (boo#1205612) - Run test with correct lua version * Wed Aug 31 2022 Gordon Leung - Add %%check section and test.lua * Sun Aug 28 2022 Gordon Leung - noarch the doc package * Fri Aug 26 2022 Gordon Leung - Add previously unpackaged re.lua module * Tue Feb 9 2021 Dominique Leuenberger - Use %%lua_provides: add the lua-mod_name provides/obsoletes to the lua version matching the distro default. * Mon Jul 6 2020 Matej Cepl - Add lua54 as new build target * Tue Mar 12 2019 Matej Cepl - Update to 1.0.2, which is just a bugfix release. * Mon Oct 30 2017 jmatejek@suse.com - do not build for Lua 5.2 * Thu Jul 13 2017 tchvatal@suse.com - Switch to multibuild spec for all lua versions * Fri Feb 17 2017 callumjfarmer13@gmail.com - Version to 1.0.1 * Mon Mar 2 2015 tchvatal@suse.com - Version bump to 0.12.1: * no upstream changelog provided * Mon Mar 2 2015 tchvatal@suse.com - Initial commit. Required for neovim.