[packages/lua-lpeg: 1/2] new, version 0.12.2

glen glen at pld-linux.org
Thu Sep 15 21:14:47 CEST 2016


commit 50c3589bbaac494aa4c0906289862aa2bbc935a6
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Sep 15 22:13:52 2016 +0300

    new, version 0.12.2
    
    based on fedora package, d16a474

 lua-lpeg.spec | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
---
diff --git a/lua-lpeg.spec b/lua-lpeg.spec
new file mode 100644
index 0000000..0d36457
--- /dev/null
+++ b/lua-lpeg.spec
@@ -0,0 +1,58 @@
+%define	__lua	/usr/bin/lua5.1
+#define	luaver %(%{__lua} -e "print(string.sub(_VERSION, 5))")
+%define	luaver 5.1
+%define	lualibdir %{_libdir}/lua/%{luaver}
+%define	luapkgdir %{_datadir}/lua/%{luaver}
+
+Summary:	Parsing Expression Grammars for Lua
+Name:		lua-lpeg
+Version:	0.12.2
+Release:	1
+License:	MIT
+Group:		Development/Libraries
+Source0:	http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-%{version}.tar.gz
+# Source0-md5:	fabb614eb46e370d4f6b8fd82d17ca7e
+URL:		http://www.inf.puc-rio.br/~roberto/lpeg/
+BuildRequires:	lua-devel >= %{luaver}
+BuildRequires:	pkg-config
+Requires:	lua >= %{luaver}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+LPeg is a new pattern-matching library for Lua, based on Parsing
+Expression Grammars (PEGs).
+
+%prep
+%setup -q -n lpeg-%{version}
+%{__sed} -i -e "s|/usr/bin/env lua5.1|%{__lua}|" test.lua
+# strict module not part of our Lua 5.1.4
+%{__sed} -i -e 's|require"strict"|-- require"strict"|' test.lua
+%{__chmod} -x test.lua
+
+%build
+%{__make} lpeg.so \
+	CC="%{__cc}" \
+	COPT="%{rpmcflags}" \
+	LUADIR=$(pkg-config --variable includedir lua%{luaver}) \
+	DLLFLAGS="-shared -fPIC $(pkg-config --libs lua%{luaver})"
+
+%if %{with tests}
+%{__lua} test.lua
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{lualibdir},%{luapkgdir}}
+
+install -p lpeg.so $RPM_BUILD_ROOT%{lualibdir}/lpeg.so.%{version}
+ln -s lpeg.so.%{version} $RPM_BUILD_ROOT%{lualibdir}/lpeg.so
+install -p re.lua $RPM_BUILD_ROOT%{luapkgdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc HISTORY lpeg.html re.html lpeg-128.gif test.lua
+%attr(755,root,root) %{lualibdir}/lpeg.so*
+%{luapkgdir}/re.lua
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lua-lpeg.git/commitdiff/bf86b6f9734b01fa49aff830b275d3e7ab36006a



More information about the pld-cvs-commit mailing list