2022-04-01 02:20:16 +00:00
|
|
|
# Tests require specl which is not yet packaged
|
|
|
|
%bcond_with check
|
2008-04-08 21:33:01 +00:00
|
|
|
|
|
|
|
Name: lua-posix
|
2023-06-18 00:02:47 +00:00
|
|
|
Version: 36.2.1
|
2022-03-31 06:19:15 +00:00
|
|
|
Release: %autorelease
|
2022-04-14 11:28:44 +00:00
|
|
|
Summary: POSIX library for Lua
|
2018-07-25 12:01:45 +00:00
|
|
|
License: MIT
|
2008-04-08 21:33:01 +00:00
|
|
|
URL: http://luaforge.net/projects/luaposix/
|
2020-07-10 04:20:27 +00:00
|
|
|
Source0: https://github.com/luaposix/luaposix/archive/v%{version}/lua-posix-%{version}.tar.gz
|
2018-07-09 17:06:48 +00:00
|
|
|
BuildRequires: gcc
|
2015-02-24 16:17:36 +00:00
|
|
|
BuildRequires: lua-devel
|
2018-09-28 18:04:26 +00:00
|
|
|
%{?lua_requires}
|
2008-04-08 21:33:01 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This is a POSIX library for Lua which provides access to many POSIX features
|
|
|
|
to Lua programs.
|
|
|
|
|
2022-04-01 02:20:16 +00:00
|
|
|
|
2008-04-08 21:33:01 +00:00
|
|
|
%prep
|
2022-04-01 02:20:16 +00:00
|
|
|
%autosetup -p1 -n luaposix-%{version}
|
|
|
|
|
2015-02-26 22:01:01 +00:00
|
|
|
|
2008-04-08 21:33:01 +00:00
|
|
|
%build
|
2022-02-14 16:53:12 +00:00
|
|
|
build-aux/luke CFLAGS="%build_cflags" LDFLAGS="%build_ldflags"
|
2008-04-08 21:33:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
2020-07-04 17:41:04 +00:00
|
|
|
build-aux/luke install PREFIX=%{buildroot}%{_prefix} INST_LIBDIR=%{buildroot}%{lua_libdir}
|
2020-07-03 18:32:49 +00:00
|
|
|
|
2011-10-06 16:02:26 +00:00
|
|
|
|
2022-04-01 02:20:16 +00:00
|
|
|
%check
|
2022-04-14 11:28:27 +00:00
|
|
|
lua -e \
|
|
|
|
'package.cpath="%{buildroot}%{lua_libdir}/?.so;"..package.cpath;
|
|
|
|
package.path="%{buildroot}%{lua_pkgdir}/?.lua;"..package.path;
|
|
|
|
local posix = require("posix.errno"); print("Hello from "..posix.version.."!");'
|
|
|
|
|
|
|
|
%if %{with check}
|
2022-04-01 02:20:16 +00:00
|
|
|
lua ./spec/spec_helper.lua
|
|
|
|
%endif
|
2008-04-08 21:33:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files
|
2020-07-03 18:32:49 +00:00
|
|
|
%license LICENSE
|
2022-04-01 02:20:16 +00:00
|
|
|
%doc AUTHORS NEWS.md README.md
|
2018-09-28 18:04:26 +00:00
|
|
|
%{lua_libdir}/*
|
|
|
|
%{lua_pkgdir}/posix/
|
2008-04-08 21:33:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-03-31 06:19:15 +00:00
|
|
|
%autochangelog
|