Use RPM macros from lua-devel

This cleans up the spec file by using existing macros, rather than
redefining them. As a side-effect, this improves rebuilding this
package for Flatpak inclusion with prefix=/app, since the
canonical versions are more robust against running without the
lua interpreter in the path -they use a lua macro rather than
shell expansion.
This commit is contained in:
Owen W. Taylor 2018-09-28 18:04:26 +00:00 committed by Kalev Lember
parent 93f68909c4
commit add6099fd9

View File

@ -6,7 +6,7 @@
Name: lua-posix
Version: 33.3.1
Release: 14%{?dist}
Release: 15%{?dist}
Summary: A POSIX library for Lua
License: MIT
URL: http://luaforge.net/projects/luaposix/
@ -16,11 +16,7 @@ BuildRequires: lua-devel
BuildRequires: ncurses-devel
BuildRequires: lua-lunit
BuildRequires: perl-interpreter
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: lua(abi) = %{luaver}
%else
Requires: lua >= %{luaver}
%endif
%{?lua_requires}
%description
This is a POSIX library for Lua which provides access to many POSIX features
@ -31,7 +27,7 @@ to Lua programs.
%build
%configure --libdir=%{lualibdir} --datadir=/%{luapkgdir}
%configure --libdir=%{lua_libdir} --datadir=/%{lua_pkgdir}
make V=1 %{?_smp_mflags}
@ -47,12 +43,15 @@ make V=1 check
%license COPYING
%doc AUTHORS ChangeLog NEWS README
%{_defaultdocdir}/luaposix/
%{lualibdir}/*
%{luapkgdir}/*.lua
%{luapkgdir}/posix/
%{lua_libdir}/*
%{lua_pkgdir}/*.lua
%{lua_pkgdir}/posix/
%changelog
* Wed Jan 22 2020 Owen Taylor <otaylor@redhat.com> - 33.3.1-15
- Use RPM macros from lua-devel
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 33.3.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild