Handle lua and perl not being in buildroots

Use %license
Cleanup spec
This commit is contained in:
Orion Poplawski 2016-12-12 15:30:41 -07:00
parent 7c0df639f0
commit 827a31c0b2

View File

@ -1,4 +1,4 @@
%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))")}
%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))" || echo 0)}
%global lualibdir %{_libdir}/lua/%{luaver}
%global luapkgdir %{_datadir}/lua/%{luaver}
%global commit 58016bbba40b063e8a98a7e9f14acfcd46f103d4
@ -6,16 +6,16 @@
Name: lua-posix
Version: 33.3.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A POSIX library for Lua
Group: Development/Libraries
License: Public Domain
URL: http://luaforge.net/projects/luaposix/
Source0: https://github.com/luaposix/luaposix/archive/release-v%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: lua-devel
BuildRequires: ncurses-devel
BuildRequires: lua-lunit
BuildRequires: perl
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: lua(abi) = %{luaver}
%else
@ -36,7 +36,6 @@ make V=1 %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
@ -44,12 +43,9 @@ make install DESTDIR=$RPM_BUILD_ROOT
make V=1 check
%clean
rm -rf $RPM_BUILD_ROOT
%files
%doc AUTHORS ChangeLog COPYING NEWS README
%license COPYING
%doc AUTHORS ChangeLog NEWS README
%{_defaultdocdir}/luaposix/
%{lualibdir}/*
%{luapkgdir}/*.lua
@ -57,6 +53,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Dec 12 2016 Orion Poplawski <orion@cora.nwra.com> - 33.3.1-3
- Handle lua and perl not being in buildroots
- Use %%license
- Cleanup spec
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 33.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild