commit fdbd6eed71c1e5c8d7a9f3a76c3c200f108310ca Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:02:59 2019 -0400 Package init diff --git a/lpeg-1.0.2.tar.gz b/lpeg-1.0.2.tar.gz new file mode 100755 index 0000000..6229c88 Binary files /dev/null and b/lpeg-1.0.2.tar.gz differ diff --git a/lua-lpeg.spec b/lua-lpeg.spec new file mode 100755 index 0000000..5356247 --- /dev/null +++ b/lua-lpeg.spec @@ -0,0 +1,66 @@ +%define mod_name lpeg + +Name: lua-%{mod_name} +Version: 1.0.2 +Release: 2 +Summary: Parsing Expression Grammars For Lua +License: MIT +URL: http://www.inf.puc-rio.br/~roberto/lpeg/ +Source0: http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-%{version}.tar.gz + +BuildRequires: gcc, lua-devel +Requires: lua, lua(abi) + +%description +LPeg is a new pattern-matching library for Lua, based on Parsing Expression +Grammars (PEGs).Following the Snobol tradition, LPeg defines patterns as +first-class objects. That is, patterns are regular Lua values (represented by +userdata). The library offers several functions to create and compose patterns. +With the use of metamethods, several of these functions are provided as infix +or prefix operators. On the one hand, the result is usually much more verbose +than the typical encoding of patterns using the so called regular expressions +(which typically are not regular expressions in the formal sense). On the other +hand, first-class patterns allow much better documentation (as it is easy to +comment the code, to break complex definitions in smaller parts, etc.) and are +extensible, as we can define new functions to create and compose patterns. + +%prep +%autosetup -n %{mod_name}-%{version} -p1 + +%build +%make_build COPT="%{optflags}" + +%install +%{__mkdir_p} %{buildroot}%{lua_libdir} +%{__mkdir_p} %{buildroot}%{lua_pkgdir} +%{__install} -p lpeg.so %{buildroot}%{lua_libdir}/lpeg.so.%{version} +%{__ln_s} lpeg.so.%{version} %{buildroot}%{lua_libdir}/lpeg.so +%{__install} -p -m 0644 re.lua %{buildroot}%{lua_pkgdir} + +%check +make test + +%pre + + +%preun + + +%post + + +%postun + + +%files +%doc HISTORY lpeg-128.gif lpeg.html re.html test.lua +%{lua_libdir}/lpeg.* +%{lua_pkgdir}/* + +%changelog +* Sat Sep 21 2019 openEuler Buildteam - 1.0.2-2 +- Modify spec error information + +* Sat Aug 31 2019 openEuler Buildteam - 1.0.2-1 +- Package init +