6 Star 0 Fork 7

src-openEuler/lua-lpeg
关闭

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lua-lpeg.spec 1.98 KB
一键复制 编辑 原始数据 按行查看 历史
%define mod_name lpeg
Name: lua-%{mod_name}
Version: 1.0.2
Release: 3
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
Patch0: 0001-lua-lpeg-fix-cc.patch
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
* Fri Apr 21 2023 Zhang Chao <chaozhangm@isoftstone.com> - 1.0.2-3
- Fix CC compiler support
* Sat Sep 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0.2-2
- Modify spec error information
* Sat Aug 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0.2-1
- Package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/lua-lpeg.git
git@gitee.com:src-openeuler/lua-lpeg.git
src-openeuler
lua-lpeg
lua-lpeg
openEuler-24.09

搜索帮助