## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global forgeurl https://github.com/hoelzro/lua-linenoise %global tag %{version} %forgemeta Name: lua-linenoise Version: 0.9 Release: %autorelease Summary: A binding for the linenoise command line library # Binding is MIT license and bundled linenoise is BSD License: MIT AND BSD-2-Clause URL: %{forgeurl} Source: %{forgesource} BuildRequires: lua-devel BuildRequires: gcc Provides: bundled(linenoise) Provides: bundled(linenoise-utf8) %description Linenoise (https://github.com/antirez/linenoise) is a delightfully simple command line library. This Lua module is simply a binding for it. The main Linenoise upstream has stagnated a bit, so this binding tracks https://github.com/yhirose/linenoise/tree/utf8-support, which includes things like UTF-8 support and ANSI terminal escape sequence detection. %prep %forgesetup %build %{__cc} %{optflags} %{?__global_ldflags} -fPIC -c -o linenoise.o linenoise.c %{__cc} %{optflags} %{?__global_ldflags} -fPIC -c -o encodings/utf8.o encodings/utf8.c %{__cc} %{optflags} %{?__global_ldflags} -fPIC -c -o linenoiselib.o linenoiselib.c %{__cc} %{?__global_ldflags} -shared -o linenoise.so linenoise.o encodings/utf8.o linenoiselib.o %install install -dD %{buildroot}%{lua_libdir} install -p -m 755 linenoise.so %{buildroot}%{lua_libdir}/ %check LUA_CPATH=%{buildroot}%{lua_libdir}/linenoise.so \ lua -e 'local L = require "linenoise"; L.enableutf8();' %files %license COPYING %doc README.md %doc Changes %doc readline-readme.md %doc example.lua %{lua_libdir}/linenoise.so %changelog ## START: Generated by rpmautospec * Thu Jul 18 2024 Fedora Release Engineering - 0.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Thu Jan 25 2024 Fedora Release Engineering - 0.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 0.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Aug 15 2023 Jonny Heggheim - 0.9-1 - Initial import (fedora#2143020). ## END: Generated by rpmautospec