summaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorMichel Alexandre Salim <salimma@fedoraproject.org>2020-11-25 14:12:55 -0800
committerMichel Alexandre Salim <salimma@fedoraproject.org>2020-11-25 14:12:55 -0800
commit4046ba39c9a0e35ee25c8c65f833344535c14240 (patch)
treeef37e8a5bdadef044dd0518c61febd579f9b8044 /lua
parent830b583f8a2b19bfaea02a325624a0d9b999b853 (diff)
downloadspecs-4046ba39c9a0e35ee25c8c65f833344535c14240.tar.gz
specs-4046ba39c9a0e35ee25c8c65f833344535c14240.tar.xz
specs-4046ba39c9a0e35ee25c8c65f833344535c14240.zip
+ lua-readline
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
Diffstat (limited to 'lua')
-rw-r--r--lua/lua-readline.spec63
1 files changed, 63 insertions, 0 deletions
diff --git a/lua/lua-readline.spec b/lua/lua-readline.spec
new file mode 100644
index 0000000..6c1eb18
--- /dev/null
+++ b/lua/lua-readline.spec
@@ -0,0 +1,63 @@
+%global srcname readline
+
+# Tests curretly fail
+# Testing readline.lua 2.7, 15apr2020 on Linux
+# ok 1 - type of RL is table
+# About to test the Alternative Interface ...
+# Tab-completion should work: readline: readline_callback_read_char() called with no handler!
+%bcond_with tests
+
+Name: lua-%{srcname}
+Version: 2.7
+Release: 1%{?dist}
+Summary: Lua interface to the readline and history libraries
+
+License: MIT
+URL: https://www.pjb.com.au/comp/lua/%{srcname}.html
+Source0: https://www.pjb.com.au/comp/lua/%{srcname}-%{version}.tar.gz
+
+BuildRequires: gcc
+BuildRequires: lua-devel >= 5.1
+%if %{with tests}
+BuildRequires: lua-posix
+%endif
+BuildRequires: readline-devel
+Requires: lua-posix
+
+%description
+This Lua module offers a simple calling interface to the GNU Readline/History
+Library.
+
+
+%prep
+%autosetup -n %{srcname}-%{version} -p1
+
+
+%build
+gcc %{optflags} -fPIC \
+ $(pkgconf --cflags --libs lua) $(pkgconf --cflags --libs readline) \
+ -c C-%{srcname}.c
+gcc -shared -o C-%{srcname}.so C-%{srcname}.o
+
+%install
+mkdir -p %{buildroot}%{lua_libdir}
+mkdir -p %{buildroot}%{lua_pkgdir}
+cp -p C-%{srcname}.so %{buildroot}%{lua_libdir}/
+cp -p %{srcname}.lua %{buildroot}%{lua_pkgdir}/
+
+
+%if %{with tests}
+%check
+lua test/test_rl.lua
+%endif
+
+
+%files
+%doc doc/%{srcname}.html
+%{lua_libdir}/C-%{srcname}.so
+%{lua_pkgdir}/%{srcname}.lua
+
+
+%changelog
+* Wed Nov 25 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 2.7-1
+- Initial package